Type.registerNamespace("Telerik.Web.UI");
(function(c,b){var f;
var a=60000;
var d=a*60;
var e=d*24;
b.RecurrenceState=function(){};
b.RecurrenceState.prototype={NotRecurring:0,Master:1,Occurrence:2,Exception:3};
b.RecurrenceState.registerEnum("Telerik.Web.UI.RecurrenceState");
b.SchedulerAppointment=function(j,h){this._attributes=new b.SchedulerAttributeCollection(this);
this._visible=true;
this._domElement=null;
this._domElements=[];
this._recurrenceState=b.RecurrenceState.NotRecurring;
this._recurrenceRule="";
this._backColor=null;
this._borderStyle="solid";
this._borderColor=null;
this._borderWidth=null;
if(!j){return;
}this._id=j.id;
this._subject=j.subject;
this._description=j.description;
this._start=new Date(Date.parse(j.start));
this._end=new Date(Date.parse(j.end));
this._toolTip=j.toolTip;
this._internalID=j.internalID;
this._visible=j.visible;
this._recurrenceState=j.recurrenceState;
this._recurrenceParentID=j.recurrenceParentID;
this._contextMenuID=j.contextMenuID;
this._serializedResources=j.resources;
this._resources=null;
if(j.domElements){for(var k=0,l=j.domElements.length;
k<l;
k++){this._domElements[k]=$get(j.domElements[k]);
}}this._column=null;
this._allowEdit=null;
if(typeof(j.allowEdit)!="undefined"){this._allowEdit=j.allowEdit;
}this._allowDelete=null;
if(typeof(j.allowDelete)!="undefined"){this._allowDelete=j.allowDelete;
}this._owner=h;
this._oldZIndex=null;
this._originalParent=null;
if(typeof(j.attributes)!="undefined"){this._attributes._load(j.attributes);
}};
b.SchedulerAppointment.prototype={get_id:function(){return this._id;
},get_internalID:function(){return this._internalID;
},get_subject:function(){return this._subject;
},set_subject:function(h){this._subject=h;
},get_description:function(){return this._description;
},set_description:function(h){this._description=h;
},get_start:function(){return this._start;
},set_start:function(h){this._start=h;
},get_end:function(){return this._end;
},set_end:function(h){this._end=h;
},get_duration:function(){return this._end-this._start;
},get_durationInMinutes:function(){return Math.round(this.get_duration()/a);
},get_toolTip:function(){return this._toolTip;
},set_toolTip:function(h){this._toolTip=h;
if(this._domElements&&this._domElements.length){c.each(this._domElements,function(){this.title=h;
});
}},get_cssClass:function(){return this._cssClass||"";
},set_cssClass:function(h){this._cssClass=h;
if(this._domElements&&this._domElements.length){c.each(this._domElements,function(){this.className="rsApt";
c(this).addClass(h);
});
}},set_backColor:function(h){this._backColor=h;
c(this.get_element()).addClass("rsAptSimple").css("backgroundColor",h);
},get_backColor:function(){return this._backColor;
},set_borderStyle:function(h){this._borderStyle=h;
c(this.get_element()).addClass("rsAptSimple").css("borderStyle",h);
},get_borderStyle:function(){return this._borderStyle;
},set_borderColor:function(h){this._borderColor=h;
c(this.get_element()).addClass("rsAptSimple").css("borderColor",h);
},get_borderColor:function(){return this._borderColor;
},set_borderWidth:function(h){if(typeof(h)=="number"){h+="px";
}this._borderWidth=h;
c(this.get_element()).addClass("rsAptSimple").css("borderWidth",h);
},get_borderWidth:function(){return this._borderWidth;
},get_visible:function(){return this._visible;
},get_radScheduler:function(){return this._owner;
},get_owner:function(){return this._owner;
},_setOwner:function(h){this._owner=h;
},get_allowEdit:function(){return this._allowEdit;
},set_allowEdit:function(h){this._allowEdit=h;
},get_allowDelete:function(){return this._allowDelete;
},set_allowDelete:function(h){this._allowDelete=h;
},get_element:function(){if(!this._domElement&&this._domElements&&this._domElements.length>0){this._domElement=this._domElements[0];
}return this._domElement;
},get_elements:function(){return this._domElements;
},get_timeSlot:function(){var h=this.get_owner();
if(!h){return null;
}return h.get_activeModel().getTimeSlotForAppointment(this);
},get_attributes:function(){return this._attributes;
},get_recurrenceState:function(){return this._recurrenceState;
},set_recurrenceState:function(h){this._recurrenceState=h;
},get_recurrenceRule:function(){return this._recurrenceRule;
},set_recurrenceRule:function(h){this._recurrenceRule=h;
},get_recurrenceParentID:function(){return this._recurrenceParentID;
},get_resources:function(){if(!this._resources){this._resources=new b.SchedulerResourceCollection();
for(var h in this._serializedResources){var k=this._serializedResources[h];
if(k.text){this._resources.add(new b.SchedulerResource(k));
}else{var i=this.get_owner().get_resources().getResourcesByType(k.type);
var j=this._resources;
i.forEach(function(l){if(l.get_key()==k.key){j.add(l);
}});
}}}return this._resources;
},edit:function(){var h=this.get_owner();
if(h){h.editAppointment(this);
}},remove:function(){var h=this.get_owner();
if(h){h.deleteAppointment(this);
}},compare:function(h){if(this.get_start().getTime()<h.get_start().getTime()){return -1;
}if(this.get_start().getTime()>h.get_start().getTime()){return 1;
}if(this.get_end().getTime()>h.get_end().getTime()){return -1;
}return 0;
},_isAllDay:function(){return this.get_duration()%e==0;
},_isInRange:function(i,j){var k=this.get_start();
var h=this.get_end();
var l=k<j&&h>i;
if(this.get_duration()==0){return l||k.getTime()==i.getTime();
}return l;
},_rangeIsInsideAppointment:function(h,i){return this.get_start()<=h&&this.get_end()>=i;
},_getTimeSlot:function(){if(!this._timeSlot){if(!this.get_owner()){return null;
}this._timeSlot=this.get_owner().get_activeModel().getTimeSlotForAppointment(this);
}return this._timeSlot;
},_getColumn:function(){return this._column;
},_setColumn:function(h){this._column=h;
},_setRowIndex:function(h){this._rowIndex=h;
},_getRowIndex:function(){return this._rowIndex;
},_startDrag:function(){var j=this.get_element();
var i=this.get_owner().get_element();
c(j).css("opacity",0.6);
if($telerik.isIE){c(j).css("padding-bottom","4px");
if($telerik.isIE6){var h=c("div.rsAptResize",j);
if(h.length>0){h.data("opacity",h.css("opacity")).css("opacity","");
}}}i.style.cursor="move";
this._oldZIndex=j.style.zIndex;
j.style.zIndex=999;
this._originalParent=j.parentNode;
Sys.UI.DomElement.removeCssClass(j,"rsWAppointmentDelete");
},_resetDragStyles:function(){var j=this.get_element();
c(j).css("opacity","");
if($telerik.isIE){c(j).css("padding-bottom","0px");
if($telerik.isIE6){var h=c("div.rsAptResize",j);
if(h.length>0){h.css("opacity",h.data("opacity"));
}}}j.style.zindex=this._oldZIndex;
var i=this.get_owner().get_element();
if(i&&i.style){i.style.cursor="";
}},_abortDrag:function(){this._resetDragStyles();
var h=this.get_element();
if(h.parentNode!=this._originalParent){this._originalParent.appendChild(h);
}},_raiseMoveEnd:function(h){var j=this.get_owner();
var k=j._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var i={appointment:this,newStartTime:k.get_startTime(),editingRecurringSeries:false,targetSlot:k,isAbortedByUser:h||false};
c.raiseCancellableControlEvent(j,"appointmentMoveEnd",i);
},_finishDrag:function(){var j=this.get_owner();
this._resetDragStyles();
var l=this.get_element();
var k=j._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var h=j._activeModel.getTimeSlotFromDomElement(l);
if((k.get_index()==h.get_index())){this._abortDrag();
this._raiseMoveEnd();
return;
}var i={OnConfirm:this._onAppointmentMoveCallback,OnCancel:this._onAppointmentMoveAbortCallback,Scheduler:this.get_owner(),Appointment:this,SourceSlot:k,TargetSlot:h,CallbackIsCalledFromDialog:true};
if(j.get_displayRecurrenceActionDialogOnMove()&&(this._recurrenceState==1||this._recurrenceState==2)){this._showRecurrenceActionDialog(i);
}else{i.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(false,i);
}},_showRecurrenceActionDialog:function(h){var i=this.get_owner();
var k=new b.SchedulerRecurrenceActionDialogShowingEventArgs(h.Appointment,b.RecurrenceAction.Move);
i.raise_recurrenceActionDialogShowing(k);
if(k.get_cancel()){var j=k.get_editSeries();
if(j!==null){h.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(j,h);
}else{this._onAppointmentMoveAbortCallback(h);
}}else{b.RecurrenceActionDialog.Show(b.RecurrenceAction.Move,h);
}},_onAppointmentMoveCallback:function(j,h){if(h.CallbackIsCalledFromDialog){var k=new b.SchedulerRecurrenceActionDialogClosedEventArgs(h.Appointment,b.RecurrenceAction.Move,j);
h.Scheduler.raise_recurrenceActionDialogClosed(k);
}var l={appointment:h.Appointment,newStartTime:h.TargetSlot.get_startTime(),editingRecurringSeries:j,targetSlot:h.TargetSlot,isAbortedByUser:false};
var i=c.raiseCancellableControlEvent(h.Scheduler,"appointmentMoveEnd",l);
if(!i){h.Scheduler.moveAppointment(h.Appointment,j,h.SourceSlot,h.TargetSlot);
}else{h.Appointment._abortDrag();
}},_onAppointmentMoveAbortCallback:function(h){h.Appointment._abortDrag();
h.Appointment._raiseMoveEnd(true);
},_hasSimpleStyling:function(){return this.get_backColor()||this.get_borderColor()||this.get_borderWidth();
},get_contextMenuID:function(){return this._contextMenuID;
},set_contextMenuID:function(h){this._contextMenuID=h;
this._contextMenu=null;
},clone:function(){var h={id:this.get_id(),subject:this.get_subject(),description:this.get_description(),start:this.get_start().format("yyyy/MM/dd HH:mm"),end:this.get_end().format("yyyy/MM/dd HH:mm"),toolTip:this.get_toolTip(),internalID:this.get_internalID(),visible:this.get_visible(),recurrenceState:this.get_recurrenceState(),recurrenceParentID:this.get_recurrenceParentID()};
var i=new b.SchedulerAppointment(h,null);
i._resources=this.get_resources().clone();
i._attributes=this.get_attributes().clone();
for(var j in this){if(i[j]===f&&!j.startsWith("_")){i[j]=g(this[j]);
}}return i;
}};
function g(j){var i=j,h;
if(j&&typeof j==="object"){i=Object.prototype.toString.call(j)==="[object Array]"?[]:{};
for(h in j){i[h]=g(j[h]);
}}return i;
}b.SchedulerAppointment.registerClass("Telerik.Web.UI.SchedulerAppointment");
})($telerik.$,Telerik.Web.UI);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentCollection=function(a){this._array=new Array();
this._scheduler=a;
};
Telerik.Web.UI.SchedulerAppointmentCollection.prototype={add:function(a){var b=this._array.length;
this.insert(b,a);
},insert:function(b,a){Array.insert(this._array,b,a);
this._notify(function(c){c._onAppointmentInserting(a);
});
},remove:function(c,b){if(typeof(b)=="undefined"){b=true;
}var a=Array.remove(this._array,c);
this._notify(function(d){d._onAppointmentRemove(c,b);
});
return a;
},removeAt:function(c,a){var b=this.getAppointment(c);
if(b){this.remove(b,a);
}},_clear:function(){this._notify(function(a){a._onAppointmentsClear();
});
this._array=new Array();
},get_count:function(){return this._array.length;
},getAppointment:function(a){return this._array[a];
},indexOf:function(a){return Array.indexOf(this._array,a);
},forEach:function(b){for(var c=0,a=this.get_count();
c<a;
c++){b(this.getAppointment(c));
}},getAppointmentsInRange:function(a,b){return this.findAll(function(c){var e=c.get_start();
var d=c.get_end();
return e<b&&d>a;
});
},getAppointmentsStartingInRange:function(a,b){return this.findAll(function(c){var d=c.get_start();
return d>=a&&d<b;
});
},findAll:function(b){var a=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(c){if(b(c)){a.add(c);
}});
return a;
},find:function(b){var a=null;
this.forEach(function(c){if(!a&&b(c)){a=c;
}});
return a;
},findByID:function(b){var a=null;
this.forEach(function(c){if(c.get_id()==b){a=c;
}});
return a;
},findByResource:function(a){var b=new Telerik.Web.UI.SchedulerResource();
if(a){b._type=a.type||a.get_type();
b._key=a.key;
if(a.get_key){b._key=a.get_key();
}}return this.findAll(function(c){var e=c.get_resources().getResourcesByType(b.get_type());
if(typeof b.get_key()==="undefined"){return e.get_count()>0;
}var d=false;
e.forEach(function(f){if(f.get_key()===b.get_key()){d=true;
}});
return d;
});
},_notify:function(a){if(this._scheduler){a(this._scheduler);
}}};
Telerik.Web.UI.SchedulerAppointmentCollection.registerClass("Telerik.Web.UI.SchedulerAppointmentCollection");
Type.registerNamespace("Telerik.Web.UI.Scheduler.Rendering");
(function(){var a=Telerik.Web.UI.Scheduler.Rendering;
a.Block=function(){this._columns=new Array();
this._parts=new Array();
this._start=null;
this._end=null;
};
a.Block.prototype={add:function(d){if(this._columns.length<1){this._createColumn();
}var e=false;
for(var c=0;
c<this._columns.length;
c++){if(this._columns[c].tryAdd(d)){e=true;
break;
}}if(!e){var b=this._createColumn();
b.tryAdd(d);
}Array.add(this._parts,d);
if(!this._start||this._start>d.start){this._start=d.start;
}if(!this._end||this._end<d.end){this._end=d.end;
}},remove:function(c){var b=Array.remove(this._parts,c);
if(!b){return;
}var d=c.column;
d.remove(c);
if(d.get_parts().length==0){Array.remove(this._columns,d);
}},overlapsWith:function(b){if(this._parts.length==0){return false;
}return this._start<=b.end&&this._end>b.start;
},_createColumn:function(){var c=new a.Column(this);
var b=this._columns.length;
Array.insert(this._columns,b,c);
return c;
},get_columns:function(){return this._columns;
},forEach:function(c){for(var d=0,b=this._parts.length;
d<b;
d++){c(this._parts[d]);
}}};
a.Block.registerClass("Telerik.Web.UI.Scheduler.Rendering.Block");
})();
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Scheduler");
(function(){var a=Telerik.Web.UI;
var b=a.Scheduler;
a.AppointmentEventArgs=function(c){a.AppointmentEventArgs.initializeBase(this);
this._appointment=c;
};
a.AppointmentEventArgs.prototype={get_appointment:function(){return this._appointment;
}};
a.AppointmentEventArgs.registerClass("Telerik.Web.UI.AppointmentEventArgs",Sys.EventArgs);
a.SchedulerAppointmentCancelEventArgs=function(c){a.SchedulerAppointmentCancelEventArgs.initializeBase(this);
this._appointment=c;
};
a.SchedulerAppointmentCancelEventArgs.prototype={get_appointment:function(){return this._appointment;
}};
a.SchedulerAppointmentCancelEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentCancelEventArgs",Sys.CancelEventArgs);
a.SchedulerAppointmentClickEventArgs=function(c,d){a.SchedulerAppointmentClickEventArgs.initializeBase(this,[c]);
this._domEvent=d;
};
a.SchedulerAppointmentClickEventArgs.prototype={get_domEvent:function(){return this._domEvent;
}};
a.SchedulerAppointmentClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentClickEventArgs",a.AppointmentEventArgs);
a.SchedulerAppointmentInsertingEventArgs=function(c,e,d){a.SchedulerAppointmentInsertingEventArgs.initializeBase(this);
this._startTime=c;
this._isAllDay=e;
this._targetSlot=d;
};
a.SchedulerAppointmentInsertingEventArgs.prototype={get_startTime:function(){return this._startTime;
},get_isAllDay:function(){return this._isAllDay;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentInsertingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs",Sys.CancelEventArgs);
a.SchedulerAppointmentResizeStartEventArgs=function(c){a.SchedulerAppointmentResizeStartEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentResizeStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentResizeEndEventArgs=function(c,d,e,f){a.SchedulerAppointmentResizeEndEventArgs.initializeBase(this,[c]);
this._targetSlot=d;
this._newEndTime=e;
this._editingRecurringSeries=f;
};
a.SchedulerAppointmentResizeEndEventArgs.prototype={get_newTime:function(){return this._newEndTime;
},get_newEndTime:function(){return this._newEndTime;
},get_editingRecurringSeries:function(){return this._editingRecurringSeries;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentResizeEndEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentResizingEventArgs=function(c,d){a.SchedulerAppointmentResizingEventArgs.initializeBase(this,[c]);
this._targetSlot=d;
};
a.SchedulerAppointmentResizingEventArgs.prototype={get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentResizingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentDeletingEventArgs=function(c,d){a.SchedulerAppointmentDeletingEventArgs.initializeBase(this,[c]);
this._editingRecurringSeries=d;
};
a.SchedulerAppointmentDeletingEventArgs.prototype={get_editingRecurringSeries:function(){return this._editingRecurringSeries;
}};
a.SchedulerAppointmentDeletingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentDeletedEventArgs=function(c){a.SchedulerAppointmentDeletedEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentDeletedEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs",a.AppointmentEventArgs);
a.SchedulerAppointmentEditingEventArgs=function(c,d){a.SchedulerAppointmentEditingEventArgs.initializeBase(this,[c]);
this._editingRecurringSeries=d;
};
a.SchedulerAppointmentEditingEventArgs.prototype={get_editingRecurringSeries:function(){return this._editingRecurringSeries;
}};
a.SchedulerAppointmentEditingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentEditingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentMoveStartEventArgs=function(c){a.SchedulerAppointmentMoveStartEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentMoveStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentMovingEventArgs=function(c,d){a.SchedulerAppointmentMovingEventArgs.initializeBase(this,[c]);
this._targetSlot=d;
};
a.SchedulerAppointmentMovingEventArgs.prototype={get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentMovingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMovingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerTimeSlotClickEventArgs=function(d,c,e){a.SchedulerTimeSlotClickEventArgs.initializeBase(this);
this._time=d;
this._targetSlot=c;
this._domEvent=e;
};
a.SchedulerTimeSlotClickEventArgs.prototype={get_time:function(){return this._time;
},get_domEvent:function(){return this._domEvent;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerTimeSlotClickEventArgs.registerClass("Telerik.Web.UI.SchedulerTimeSlotClickEventArgs",Sys.EventArgs);
a.SchedulerAppointmentDoubleClickEventArgs=function(c){a.SchedulerAppointmentDoubleClickEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentDoubleClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs",a.AppointmentEventArgs);
a.SchedulerRecurrenceActionDialogShowingEventArgs=function(c,d){a.SchedulerRecurrenceActionDialogShowingEventArgs.initializeBase(this,[c]);
this._recurrenceAction=d;
this._editSeries=null;
};
a.SchedulerRecurrenceActionDialogShowingEventArgs.prototype={get_recurrenceAction:function(){return this._recurrenceAction;
},get_editSeries:function(){return this._editSeries;
},set_editSeries:function(c){this._editSeries=c;
}};
a.SchedulerRecurrenceActionDialogShowingEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerRecurrenceActionDialogClosedEventArgs=function(c,e,d){a.SchedulerRecurrenceActionDialogClosedEventArgs.initializeBase(this,[c]);
this._recurrenceAction=e;
this._editSeries=d;
};
a.SchedulerRecurrenceActionDialogClosedEventArgs.prototype={get_recurrenceAction:function(){return this._recurrenceAction;
},get_editSeries:function(){return this._editSeries;
}};
a.SchedulerRecurrenceActionDialogClosedEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs",a.AppointmentEventArgs);
a.SchedulerFormCreatedEventArgs=function(c,d,f,e){a.SchedulerFormCreatedEventArgs.initializeBase(this,[c]);
this._formElement=d;
this._mode=f;
this._editingRecurringSeries=e||false;
};
a.SchedulerFormCreatedEventArgs.prototype={get_formElement:function(){return this._formElement;
},get_mode:function(){return this._mode;
},get_editingRecurringSeries:function(){return this._editingRecurringSeries;
}};
a.SchedulerFormCreatedEventArgs.registerClass("Telerik.Web.UI.SchedulerFormCreatedEventArgs",a.AppointmentEventArgs);
a.SchedulerAppointmentContextMenuEventArgs=function(c,d){a.SchedulerAppointmentContextMenuEventArgs.initializeBase(this,[c]);
this._domEvent=d;
};
a.SchedulerAppointmentContextMenuEventArgs.prototype={get_domEvent:function(){return this._domEvent;
}};
a.SchedulerAppointmentContextMenuEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs",a.AppointmentEventArgs);
a.SchedulerTimeSlotContextMenuEventArgs=function(e,d,f,c){a.SchedulerTimeSlotContextMenuEventArgs.initializeBase(this);
this._time=e;
this._isAllDay=d;
this._domEvent=f;
this._targetSlot=c;
};
a.SchedulerTimeSlotContextMenuEventArgs.prototype={get_time:function(){return this._time;
},get_isAllDay:function(){return this._isAllDay;
},get_domEvent:function(){return this._domEvent;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerTimeSlotContextMenuEventArgs.registerClass("Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs",Sys.EventArgs);
a.SchedulerWebServiceEventArgs=function(c){a.SchedulerWebServiceEventArgs.initializeBase(this);
this._schedulerInfo=c;
};
a.SchedulerWebServiceEventArgs.prototype={get_schedulerInfo:function(){return this._schedulerInfo;
}};
a.SchedulerWebServiceEventArgs.registerClass("Telerik.Web.UI.SchedulerWebServiceEventArgs",Sys.CancelEventArgs);
a.SchedulerRequestFailedEventArgs=function(c){a.SchedulerRequestFailedEventArgs.initializeBase(this);
this._errorMessage=c;
};
a.SchedulerRequestFailedEventArgs.prototype={get_errorMessage:function(){return this._errorMessage;
}};
a.SchedulerRequestFailedEventArgs.registerClass("Telerik.Web.UI.SchedulerRequestFailedEventArgs",Sys.CancelEventArgs);
b.RequestSuccessEventArgs=function(c){b.RequestSuccessEventArgs.initializeBase(this);
this._result=c;
};
b.RequestSuccessEventArgs.prototype={get_result:function(){return this._result;
}};
b.RequestSuccessEventArgs.registerClass("Telerik.Web.UI.Scheduler.RequestSuccessEventArgs",Sys.EventArgs);
b.NavigationCommandEventArgs=function(c,d){b.NavigationCommandEventArgs.initializeBase(this);
this._command=c;
this._selectedDate=d;
};
b.NavigationCommandEventArgs.prototype={get_command:function(){return this._command;
},get_selectedDate:function(){return this._selectedDate;
}};
b.NavigationCommandEventArgs.registerClass("Telerik.Web.UI.Scheduler.NavigationCommandEventArgs",Sys.CancelEventArgs);
b.NavigationCompleteEventArgs=function(c){b.NavigationCompleteEventArgs.initializeBase(this);
this._command=c;
};
b.NavigationCompleteEventArgs.prototype={get_command:function(){return this._command;
}};
b.NavigationCompleteEventArgs.registerClass("Telerik.Web.UI.Scheduler.NavigationCompleteEventArgs",Sys.EventArgs);
b.AppointmentDataBoundEventArgs=function(c,d){b.AppointmentDataBoundEventArgs.initializeBase(this,[c]);
this._data=d;
};
b.AppointmentDataBoundEventArgs.prototype={get_data:function(){return this._data;
}};
b.AppointmentDataBoundEventArgs.registerClass("Telerik.Web.UI.Scheduler.AppointmentDataBoundEventArgs",a.AppointmentEventArgs);
})();
Type.registerNamespace("Telerik.Web.UI.Scheduler.Rendering");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI.Scheduler.Rendering;
a.Column=function(c){this._parts=[];
this._block=c;
};
a.Column.prototype={tryAdd:function(d){var c=this._getPartsInRange(d.start,d.end);
if(c.length==0){Array.add(this._parts,d);
d.column=this;
return true;
}return false;
},remove:function(d){var c=Array.remove(this._parts,d);
if(c){d.column=null;
}},get_parts:function(){return this._parts;
},get_block:function(){return this._block;
},isLastColumn:function(){var c=this.get_block().get_columns()[this.get_block().get_columns().length-1];
return c==this;
},get_width:function(){if(this.isLastColumn()){return Math.floor(90/this.get_block().get_columns().length)+90%this.get_block().get_columns().length;
}return Math.floor(90/this.get_block().get_columns().length);
},get_left:function(){var c=Array.indexOf(this.get_block().get_columns(),this);
return Math.floor(90/this.get_block().get_columns().length*c);
},_getPartsInRange:function(c,d){return b.grep(this._parts,function(e){return(e.start<d&&e.end>c);
});
}};
a.Column.registerClass("Telerik.Web.UI.Scheduler.Rendering.Column");
})();
Type.registerNamespace("Telerik.Web.UI.Scheduler");
(function(){var c=Telerik.Web.UI.Scheduler;
var a=60000;
var b=a*60;
var d=b*24;
c.DateHelper={getStartOfWeek:function(e,f){var h=e.getDay();
var g=0;
while(h!=f){if(h==0){h=6;
}else{h--;
}g++;
}return new c.DateTime(e).add(-g*d).toDate();
},getEndOfWeek:function(g,h,f){var e=c.DateHelper.getStartOfWeek(g,h);
return new c.DateTime(e).add(f*d).toDate();
},getWeekLength:function(g,h,e){var f=c.DateHelper.getStartOfWeek(g,h);
var i=new Date(f.getTime());
while(i.getDay()!=e){i=new c.DateTime(i).add(d).toDate();
}return((new c.DateTime(i).subtract(f)/d)+1);
},getDaysInMonth:function(f,e){return 32-new Date(f,e,32).getDate();
},getFirstDayOfMonth:function(f){var e=new Date(0);
e.setHours(0);
e.setMinutes(0);
e.setFullYear(f.getFullYear(),f.getMonth(),1);
return e;
},getLastDayOfMonth:function(g){var h=new Date(0);
h.setHours(0);
h.setMinutes(0);
var e=g.getFullYear();
var f=g.getMonth();
h.setFullYear(e,f,this.getDaysInMonth(e,f));
return h;
}};
})();
Type.registerNamespace("Telerik.Web.UI.Scheduler");
Telerik.Web.UI.Scheduler.EventMap=function(){this._owner=null;
this._element=null;
this._eventMap={};
this._onDomEventDelegate=null;
this._browserHandlers={};
};
Telerik.Web.UI.Scheduler.EventMap.prototype={initialize:function(a,b){this._owner=a;
if(!b){b=this._owner.get_element();
}this._element=b;
},skipElement:function(c,f){var b=c.target;
var d=b.tagName.toLowerCase();
var a=b.className;
if(d=="select"){return true;
}if(d=="option"){return true;
}if(d=="a"&&(!f||a.indexOf(f)<0)){return true;
}if(d=="input"){return true;
}if(d=="textarea"){return true;
}if(d=="button"){return true;
}return false;
},dispose:function(){if(this._onDomEventDelegate){for(var c in this._eventMap){if(this._shouldUseEventCapture(c)){var a=this._browserHandlers[c];
this._element.removeEventListener(c,a,true);
}else{$removeHandler(this._element,c,this._onDomEventDelegate);
}}this._onDomEventDelegate=null;
var d=true;
if(this._element._events){for(var b in this._element._events){if(this._element._events[b].length>0){d=false;
break;
}}if(d){this._element._events=null;
}}}},addHandlerForClassName:function(e,b,a){if(typeof(this._eventMap[e])=="undefined"){this._eventMap[e]={};
if(this._shouldUseEventCapture(e)){var g=this._getDomEventDelegate();
var d=this._element;
var c=function(h){return g.call(d,new Sys.UI.DomEvent(h));
};
this._browserHandlers[e]=c;
d.addEventListener(e,c,true);
}else{$addHandler(this._element,e,this._getDomEventDelegate());
}}var f=this._eventMap[e];
f[b]=a;
},_onDomEvent:function(h){var a=this._eventMap[h.type];
if(!a){return;
}var f=h.target;
while(f&&f.nodeType!==9){var b=f.className;
var c=b.split(" ");
var g=null;
for(var d=0;
d<c.length;
d++){g=a[c[d]];
if(g){break;
}}if(g){this._fillEventFields(h,f);
if(g.call(this._owner,h)!=true){if(!f.parentNode){h.stopPropagation();
}return;
}}if(f==this._element){return;
}f=f.parentNode;
}},_fillEventFields:function(c,a){c.eventMapTarget=a;
if(c.rawEvent.relatedTarget){c.eventMapRelatedTarget=c.rawEvent.relatedTarget;
}else{if(c.type=="mouseover"){c.eventMapRelatedTarget=c.rawEvent.fromElement;
}else{c.eventMapRelatedTarget=c.rawEvent.toElement;
}}if(!c.eventMapRelatedTarget){return;
}try{var b=c.eventMapRelatedTarget.className;
}catch(d){c.eventMapRelatedTarget=this._element;
}},_shouldUseEventCapture:function(a){return(a=="blur"||a=="focus")&&$telerik.isFirefox&&Sys.Browser.version>=3;
},_getDomEventDelegate:function(){if(!this._onDomEventDelegate){this._onDomEventDelegate=Function.createDelegate(this,this._onDomEvent);
}return this._onDomEventDelegate;
}};
Telerik.Web.UI.Scheduler.EventMap.registerClass("Telerik.Web.UI.Scheduler.EventMap");
Type.registerNamespace("Telerik.Web.UI");
(function(a){Telerik.Web.UI.InlineTemplate=function(b,g,f,e,h){this._schedulerElement=b;
this._schedulerContentElement=$telerik.getElementByClassName(this._schedulerElement,"rsContent","div");
this._localization=g;
this._minWidth=e;
this._minHeight=h;
this._wrapZIndexStep=1000;
var i=g.Save;
var d=g.Cancel;
var c=g.ShowAdvancedForm;
this._formHTMLTemplate='<div class="rsAptEditFormWrapper"> 	<div class="rsAptEditFormOuter"> 		<div class="rsAptEditFormMiddle"> 			<div class="rsAptEditFormMiddle2"> 				<div class="rsAptEditFormInner"> 					<div style="{0}" class="rsAptEditTextareaWrapper"> 						<textarea id="{1}" style="{2}"></textarea> 					</div> 					<div class="rsEditOptions"> 						<a href="#" class="rsAptEditConfirm">'+i+'</a> 						<a href="#" class="rsAptEditCancel">'+d+"</a>";
if(f){this._formHTMLTemplate+='<a href="#" class="rsAptEditMore">'+c+"</a>";
}this._formHTMLTemplate+='</div> 					<div class="rsAptEditResizeHandle"></div> 				</div> 			</div> 		</div> 	</div> </div>';
this._textareaId=this._schedulerElement.id+"_SubjectTextBox";
this._onResizeHandleMouseMoveDelegate=Function.createDelegate(this,this._onResizeHandleMouseMove);
this._onResizeHandleMouseUpDelegate=Function.createDelegate(this,this._onResizeHandleMouseUp);
this._onKeyboardEventDelegate=Function.createDelegate(this,this._onKeyboardEvent);
};
Telerik.Web.UI.InlineTemplate.EmptyFunction=function(){};
Telerik.Web.UI.InlineTemplate._positionForm=function(w){var x=a("#"+w);
var s=x.find("div.rsTopWrap div.rsAptEditSizingWrapper");
if(s.length==0){return;
}if(s[0].detached){return;
}var t=x.find("div.rsTopWrap div.rsContent");
var v=s.parents("table.rsContentTable, table.rsAllDayTable, table.rsTimelineTable");
var d=s.offset();
var m=v.offset();
var e=s.parents().is("table.rsAllDayTable")&&!t.is(".rsTimelineView");
var p=x.find("div.rsTopWrap div.rsContentScrollArea");
var c=p.scrollLeft();
var g=false;
if(!e){var o=d.top+s.height();
var i=m.top+v.height();
if(o>i){s.css("top",(i-o)+"px");
g=true;
}}var l=false;
var b=d.left+s.width();
var q=m.left+v.width();
if(k){q+=c-Telerik.Web.UI.RadScheduler._getScrollBarWidth();
}if(b>q){s.css("left",(q-b)+"px");
l=true;
var k=p[0].scrollHeight!=p[0].offsetHeight;
if(k){s.css("left",(parseInt(s.css("left"))-Telerik.Web.UI.RadScheduler._getScrollBarWidth())+"px");
}}if(e){var f=t.offset();
d=s.offset();
var j=t.prev();
if(j.is(".rsHeader")){f.top-=j.height();
}var h=(d.top-f.top);
var r=s.offset().left-t.offset().left;
s.css({top:h+"px",left:r+"px",width:s.width()+"px"});
s[0].originalLeft=r+c;
s[0].originalParent=s[0].parentNode;
s.appendTo(t);
s[0].detached=true;
}var u=s.find("div.rsAptEditTextareaWrapper");
if(u){var n=u.find("textarea:first");
if(n.length>0){if($telerik.isIE&&u.css("height")!="auto"){n.css("height",u.css("height"));
u.css("height","auto");
}if($telerik.isIE6){n.width(n.width());
}if($telerik.isFirefox){n[0].scrollIntoView=Telerik.Web.UI.InlineTemplate.EmptyFunction;
}}}if(g){t[0].scrollTop=t[0].scrollHeight;
}if(l){t[0].scrollLeft=t[0].scrollWidth;
}s.css("visibility","visible");
};
Telerik.Web.UI.InlineTemplate.prototype={instantiateIn:function(c){this._cleanup();
var f=document.createElement("div");
f.className="rsAptEditSizingWrapper";
f.style.zIndex=20000;
f.style.visibility="visible";
var d=this._getTargetElement(c);
if(d.offsetWidth<this._minWidth){f.style.width=this._minWidth+"px";
}var e="";
var g="";
if(d.offsetHeight<this._minHeight){var b="height: "+this._minHeight+"px";
if($telerik.isIE){g=b;
}else{e=b;
}}f.innerHTML=String.format(this._formHTMLTemplate,e,this._textareaId,g);
d.appendChild(f);
this._element=f;
this._textArea=document.getElementById(this._textareaId);
Telerik.Web.UI.InlineTemplate._positionForm(this._schedulerElement.id);
this._textArea.focus();
this._attachHandlers(true);
},attachTo:function(c){this._element=c;
this._textArea=a(c).find("textarea:first")[0];
var b=a("div.rsTemplateWrapper",this._element);
if(b.length>0){this._template=b[0];
}this._attachHandlers(false);
},get_events:function(){if(!this._events){this._events=new Sys.EventHandlerList();
}return this._events;
},get_text:function(){if(this._textArea){return this._textArea.value;
}},set_text:function(b){if(this._textArea){this._textArea.value=b;
}},get_start:function(){return this._start;
},set_start:function(b){this._start=b;
},get_end:function(){return this._end;
},set_end:function(b){this._end=b;
},get_editSeries:function(){return this._editSeries;
},set_editSeries:function(b){this._editSeries=b;
},get_isInsert:function(){return this._isInsert;
},set_isInsert:function(b){this._isInsert=b;
},get_appointmentInternalID:function(){return this._appointmentInternalID;
},set_appointmentInternalID:function(b){this._appointmentInternalID=b;
},get_element:function(){return this._element;
},dispose:function(){this._events=null;
this._cleanup(true);
},add_saveClicked:function(b){this.get_events().addHandler("saveClicked",b);
},add_moreClicked:function(b){this.get_events().addHandler("moreClicked",b);
},_getTargetElement:function(e){var c=a(e);
var f=c;
if(!f.is("td")){f=f.parents("td:first");
}var d=f.find(".rsWrap:first");
if(c.is(".rsApt")){d=c.parent();
}if(d.length>0){d.data("originalCssText",d[0].style.cssText);
}else{f.html("");
d=a('<div class="rsWrap"></div>').appendTo(c).css({position:"absolute",top:f[0].offsetTop,left:f[0].offsetLeft,width:f.width(),height:"auto"});
d.data("originalCssText","");
}var b=d.css("zIndex");
if(b=="auto"){b=0;
}d.css({zIndex:parseInt(b)+this._wrapZIndexStep});
return d[0];
},_cleanup:function(c){if(!this._element){return;
}if(this._eventMap){this._eventMap.dispose();
}$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
var d=this._element.originalParent||this._element.parentNode;
d.style.cssText=a(d).data("originalCssText");
if(!c){a(this._element).remove();
this._element=null;
}if(d.childNodes.length==0){var b=d.parentNode;
if(b){b.removeChild(d);
if(b.innerHTML==""){b.innerHTML="&nbsp;";
}}}},_attachHandlers:function(b){if(!this._element){return;
}this._eventMap=new Telerik.Web.UI.Scheduler.EventMap();
this._eventMap.initialize(this);
this._eventMap.addHandlerForClassName("mousedown","rsAptEditResizeHandle",this._onResizeHandleMouseDown);
if(b){this._eventMap.addHandlerForClassName("click","rsAptEditConfirm",this._saveClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditCancel",this._cancelClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditMore",this._moreClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditSizingWrapper",this._clicked);
this._eventMap.addHandlerForClassName("dblclick","rsAptEditSizingWrapper",this._clicked);
}$addHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
},_saveClicked:function(b){this._raiseEvent("saveClicked",null);
this.hide();
$telerik.cancelRawEvent(b);
return false;
},_cancelClicked:function(b){this._cleanup();
$telerik.cancelRawEvent(b);
return false;
},_moreClicked:function(b){this._raiseEvent("moreClicked",null);
$telerik.cancelRawEvent(b);
return false;
},_clicked:function(b){$telerik.cancelRawEvent(b);
return false;
},_onResizeHandleMouseDown:function(c){this._resizeOrigin={x:c.clientX,y:c.clientY,scrollTop:this._schedulerContentElement.scrollTop};
this._resizing=true;
var b=this._textArea?this._textArea.parentNode.offsetHeight:this._template.offsetHeight;
this._initialSize={width:this._element.offsetWidth,height:b};
$addHandler(this._schedulerContentElement,"mousemove",this._onResizeHandleMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeHandleMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStart);
},_onResizeHandleMouseMove:function(d){if(!$telerik.isMouseOverElement(this._schedulerElement,d)){return;
}var b=d.clientX-this._resizeOrigin.x;
var c=d.clientY-this._resizeOrigin.y;
b+=this._initialSize.width+this._schedulerContentElement.scrollLeft;
c+=this._initialSize.height+(this._schedulerContentElement.scrollTop-this._resizeOrigin.scrollTop);
b=Math.max(b,this._minWidth);
c=Math.max(c,this._minHeight);
this._setSize(b,c);
Telerik.Web.UI.RadScheduler._clearSelection();
},_onResizeHandleMouseUp:function(){this._cleanupResize();
},_onSelectStart:function(){return false;
},_cleanupResize:function(){if(!this._resizing){return;
}$removeHandler(this._schedulerContentElement,"mousemove",this._onResizeHandleMouseMoveDelegate);
$removeHandler(document,"mouseup",this._onResizeHandleMouseUpDelegate);
$removeHandler(document,"selectstart",this._onSelectStart);
Telerik.Web.UI.RadScheduler._clearSelection();
this._resizing=false;
},_onKeyboardEvent:function(b){if(b.keyCode==27){this._cleanupResize();
}},_setSize:function(c,b){if(!this._element){return;
}this._element.style.width=c+"px";
if(this._textArea){if($telerik.isIE6){this._textArea.style.width="100%";
this._textArea.style.cssText=this._textArea.style.cssText;
this._textArea.style.width=this._textArea.offsetWidth+"px";
}if($telerik.isIE){this._textArea.style.height=(b-6)+"px";
}else{this._textArea.parentNode.style.height=b+"px";
}}else{this._template.style.height=b+"px";
}},hide:function(){this._cleanup();
},_raiseEvent:function(c,d){var b=this.get_events().getHandler(c);
if(b){if(!d){d=Sys.EventArgs.Empty;
}b(this,d);
}}};
})($telerik.$);
Telerik.Web.UI.InlineTemplate.registerClass("Telerik.Web.UI.InlineTemplate",null,Sys.IDisposable);
(function(a){var b='<div class="rsModalWrapper">	<div class="rsOverlay"></div>	<div class="rsModalDialog">		<div class="rsModalOuter">    		<div class="rsModalOuterTitle">   		        <a class="rsModalWindowClose" href="#" title=""></a>		        <div class="rsModalInner">			        <h1 class="rsModalTitle"></h1>			        <div class="rsModalContent"></div>			        <div class="rsModalButtons">				        <a href="#" class="rsModalConfirm">OK</a>				        <a href="#" class="rsModalClose">Cancel</a>			        </div>			        <div class="rsModalIcon"></div>		        </div>    		</div>		</div>	</div></div>';
a.bind=function(d,c){return function(f){if(f){f.preventDefault();
}return d[c].apply(d,arguments);
};
};
a.modal=function(e){if(!(this instanceof a.modal)){return new a.modal(e);
}var d=a(e);
var c=d.find(".rsModalWrapper");
var f=380;
if(c.length==0){this._dialog=a(b).appendTo(d).hide().css({height:d.height(),width:d.width(),left:"1px",top:"1px",background:"none"}).find(".rsOverlay").css({height:d.height(),width:d.width(),opacity:0}).end().find(".rsModalDialog").css({width:f,left:(d.width()-f)/2,opacity:0}).end();
}else{this._dialog=c;
}return this;
};
a.modal.prototype={initialize:function(){this._dialog.find(".rsModalClose").unbind("click").bind("click",a.bind(this,"hide")).end().find(".rsModalWindowClose").unbind("click").bind("click",a.bind(this,"hide")).end().find(".rsModalConfirm").unbind("click").bind("click",a.bind(this,"hide"));
return this;
},set_content:function(d){for(var c in d){switch(c){case"title":this._dialog.find(".rsModalTitle").text(d.title);
break;
case"content":this._dialog.find(".rsModalContent").html(d.content);
break;
case"ok":this._dialog.find(".rsModalConfirm").text(d.ok);
break;
case"cancel":this._dialog.find(".rsModalClose").text(d.cancel);
this._dialog.find(".rsModalWindowClose").attr("title",d.cancel);
break;
}}return this;
},set_onActionConfirm:function(d){if(a.isFunction(d)){var c=this._dialog.find(".rsModalConfirm");
c.bind("click",d);
}return this;
},set_onActionCancel:function(d){if(a.isFunction(d)){var c=this._dialog.find(".rsModalClose");
c.bind("click",d);
}return this;
},show:function(){this._dialog.show().find(".rsOverlay").stop().animate({opacity:0.4},"slow").end().find(".rsModalDialog").stop().animate({opacity:1},{duration:"slow",complete:function(){if($telerik.isIE){this.style.cssText=this.style.cssText.replace(/filter.*?\;/ig,"");
}}}).end();
var c=this._dialog.find(".rsModalDialog");
c.css({top:(this._dialog.parent().height()-c.height())/2});
return this;
},hide:function(){this._dialog.find(".rsOverlay").stop().animate({opacity:0},"fast").end().find(".rsModalDialog").stop().animate({opacity:0},"fast",a.bind(this._dialog,"hide")).end();
return this;
},dispose:function(){this._dialog.find(".rsModalConfirm").unbind().end().find(".rsModalClose").unbind();
}};
})($telerik.$);
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
b.popupDialog=function(d,c,e){if(!(this instanceof b.popupDialog)){return new b.popupDialog(d,c,e);
}this._targetElement=d;
this._handleElement=c;
this._legacyPositioning=this.legacyPositioning();
this.options=b.extend({},b.popupDialog.defaults,e);
this._eventsNamespace="."+d.id;
this._originalCalendarZIndex=Telerik.Web.UI.Calendar.Popup.zIndex;
return this;
};
b.popupDialog.defaults={zIndex:4000,draggable:true,minTop:10,minBottom:10,minLeft:10,minRight:10,maxHeight:550,width:700};
b.popupDialog.prototype={show:function(){var d=this._targetElement;
this._modalExtender=new Telerik.Web.UI.ModalExtender(d);
var e=this._legacyPositioning?"absolute":"fixed";
d.style.position=e;
b(this._modalExtender._getModalOverlay()).css({position:e,zIndex:this.options.zIndex});
this._modalExtender.show();
b(d).css({display:"block",zIndex:this.options.zIndex+1});
Telerik.Web.UI.Calendar.Popup.zIndex=this.options.zIndex+2;
var c=this;
b(window).bind("resize"+this._eventsNamespace,function(){c._resizeForm.apply(c);
c._positionForm.apply(c);
});
b(window).trigger("resize"+this._eventsNamespace);
if(this.options.draggable&&this._handleElement){this._dragCue=this._createDragCue();
this._makeDraggable();
}},close:function(){if(this._modalExtender){this._modalExtender.dispose();
}b([window,document,this._handleElement]).unbind(this._eventsNamespace);
Telerik.Web.UI.Calendar.Popup.zIndex=this._originalCalendarZIndex;
},legacyPositioning:function(){return $telerik.isIE6||($telerik.isIE&&$telerik.quirksMode);
},_positionForm:function(){var d=b(window),c=b(document),e=this._legacyPositioning?c.scrollTop():0,f=this._legacyPositioning?c.scrollLeft():0,g=e,h=f,i=b(this._targetElement);
f+=(d.width()-i.outerWidth())/2;
e+=(d.height()-parseInt(this.options.maxHeight,10))/2;
f=Math.max(f,h);
e=Math.max(e,g);
i.css({top:e,left:f});
},_resizeForm:function(){var f=this._targetElement,g=this.options,d=b(".rsAdvancedEdit > *:not(.rsAdvOptionsScroll)",f).outerHeight(),e=b(window).height()-g.minTop-g.minBottom-d,c=b(window).width()-g.minLeft-g.minRight;
b(f).css({width:g.width});
b(".rsAdvOptionsScroll",f).css({"max-height":g.maxHeight});
},_createDragCue:function(){var d=b(this._targetElement);
var c=b('<div class="rsAdvDragCue" style="display:none; top:0; left:0;"></div>').css({position:d.css("position"),opacity:"0.5"});
if($telerik.isIE6){c.css({background:"none",opacity:"1"});
}d.parent().append(c);
return c;
},_finishDrag:function(){var d=b(this._targetElement);
var c=this._dragCue;
d.data("mouseMove",false).css({top:c.css("top"),left:c.css("left"),"-webkit-user-select":"","-moz-user-select":""});
c.hide();
d.trigger("formMoved");
},_onMouseMove:function(g){var e=b(this._targetElement);
var l=this._dragCue;
if(!e.data("mouseMove")){return;
}a.RadScheduler._clearSelection();
var o=l.offset();
if(g.clientX>0){var m=l.data("scrollLeft")-b(window).scrollLeft();
var k=o.left+l.data("relOriginX");
var p=g.clientX-k-m;
var d=parseInt(l.css("left"))+p;
var i=b(window).width()-l.width()-this.options.minRight;
d=Math.max(Math.min(i,d),this.options.minLeft);
l.css("left",d);
}if(g.clientY>0){var h=l.data("scrollTop")-b(window).scrollTop();
var f=o.top+l.data("relOriginY");
var n=g.clientY-f-h;
var j=parseInt(l.css("top"))+n;
var c=b(window).height()-l.height()-this.options.minBottom;
j=Math.max(Math.min(c,j),this.options.minTop);
l.css("top",j);
}},_makeDraggable:function(){var f=b(this._targetElement);
var c=b(this._handleElement);
var e=this._dragCue;
c.bind("mousedown"+this._eventsNamespace,function(j){if(j.which!=1){return;
}f.trigger("formMoving");
f.data("mouseMove",true).css({"-webkit-user-select":"none","-moz-user-select":"none"});
var k=parseInt(f.css("left"))-parseInt(e.css("borderLeftWidth"));
var i=parseInt(f.css("top"))-parseInt(e.css("borderTopWidth"));
e.css({width:f.width(),height:f.height(),zIndex:parseInt(f.css("zIndex"))+1,top:i,left:k}).show();
var h=e.offset();
e.data("relOriginY",j.clientY-h.top).data("relOriginX",j.clientX-h.left).data("scrollTop",b(window).scrollTop()).data("scrollLeft",b(window).scrollLeft());
});
var d=this;
b(document).bind("mouseup"+this._eventsNamespace,function(){if(!f.data("mouseMove")){return;
}d._finishDrag.apply(d);
});
var g=function(){d._onMouseMove.apply(d,arguments);
};
b(document).bind("mouseout"+this._eventsNamespace,g);
b(document).bind("mousemove"+this._eventsNamespace,g);
}};
})();
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Scheduler");
(function(){var b=$telerik.$;
var c=Telerik.Web.UI;
var d=c.Scheduler;
var a;
var i=60000;
var e=i*60;
var g=e*24;
var h=4;
b.registerEnum(c,"SchedulerViewType",{DayView:0,WeekView:1,MonthView:2,ResourceView:3,TimelineView:4,MultiDayView:5});
b.registerEnum(c,"SchedulerNavigationCommand",{SwitchToDayView:0,SwitchToWeekView:1,SwitchToMonthView:2,SwitchToTimelineView:3,SwitchToMultiDayView:4,NavigateToNextPeriod:5,NavigateToPreviousPeriod:6,SwitchToSelectedDay:7,SwitchFullTime:8,DisplayNextAppointmentSegment:9,DisplayPreviousAppointmentSegment:10,NavigateToSelectedDate:11});
b.registerEnum(c,"DayOfWeek",{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6});
b.registerEnum(c,"SchedulerFormMode",{Hidden:0,Insert:1,Edit:2,AdvancedInsert:3,AdvancedEdit:4});
var f=c.Scheduler.DateTime=function(j){if(!j){this._date=new Date();
return;
}if(j.getTime){this._date=new Date(j.getTime());
}else{this._date=new Date(j);
}};
f.add=function(k,j){var l=j.get_ticks?j.get_ticks():j;
return f._addTicks(k,l);
};
f.subtract=function(k,l){l=new f(l).toDate();
var m=k.getTime()-l;
var j=k.getTimezoneOffset()-l.getTimezoneOffset();
return m-(j*i);
};
f.areEqual=function(j,k){return(!(j>k||k>j));
};
f.getDate=function(j){return new Date(j.getFullYear(),j.getMonth(),j.getDate());
};
f.getTimeOfDay=function(j){return f.subtract(j,f.getDate(j));
};
f._addTicks=function(l,n){var j=l.getTimezoneOffset();
var k=new Date(l.getTime()+n);
var m=k.getTimezoneOffset()-j;
return new Date(k.getTime()+m*i);
};
c.Scheduler.DateTime.prototype={get_date:function(){return new f(f.getDate(this._date));
},get_timeOfDay:function(){return f.getTimeOfDay(this._date);
},add:function(j){return new f(f.add(this._date,j));
},subtract:function(j){return f.subtract(this._date,j);
},toDate:function(){return this._date;
}};
c.Scheduler.TimeSpan=function(j){this._ticks=j||0;
};
c.Scheduler.TimeSpan.prototype={get_ticks:function(){return this._ticks;
}};
c.RadScheduler=function(j){c.RadScheduler.initializeBase(this,[j]);
this._styles={dragTarget:"rsDragTarget",inlineForm:{sizingWrapper:"rsAptEditSizingWrapper"}};
this._postBackReference=null;
this._minutesPerRow=30;
this._numberOfHoveredRows=2;
this._selectedView=0;
this._readOnly=false;
this._overflowBehavior=1;
this._shouldPostbackOnClick=true;
this._displayDeleteConfirmation=true;
this._displayRecurrenceActionDialogOnMove=false;
this._firstDayStart=null;
this._appointments=null;
this._currentAppointment=null;
this._resources=new c.SchedulerResourceCollection();
this._resourceTypes=new c.ResourceTypeCollection();
this._scrollTop=0;
this._scrollLeft=0;
this._useHorizontalScrolling=false;
this._localization=null;
this._advancedTemplate=null;
this._advancedInsertTemplate=null;
this._advancedEditTemplate=null;
this._attributes=new c.SchedulerAttributeCollection();
this._datePickerCalendarExpanded=false;
this._customAttributeNames=[];
this._timeLabelRowSpan=2;
this._enableDescriptionField=false;
this._allowEdit=true;
this._allowDelete=true;
this._allowInsert=true;
this._defaultAdvancedFormRendered=false;
this._useDefaultAdvancedInsert=true;
this._useDefaultAdvancedEdit=true;
this._startEditingInAdvancedForm=true;
this._startInsertingInAdvancedForm=false;
this._dragging=false;
this._draggingAppointment=null;
this._onKeyboardEventDelegate=null;
this._activeModel=null;
this._modelTables=null;
this._resizingState={};
this._eventMap=new c.Scheduler.EventMap();
this._rowHeight="25px";
this._minimumInlineFormHeight=50;
this._minimumInlineFormWidth=250;
this._shouldUseClientInlineInsertForm=true;
this._shouldUseClientInlineEditForm=true;
this._validationGroup=null;
this._webServiceSettings=new c.SchedulerWebServiceSettings({});
this._timeZoneOffset=0;
this._formContainerMode=c.SchedulerFormMode.Hidden;
this._editingRecurringSeries=false;
this._showFullTime=false;
this._showAllDayRow=true;
this._firstDayOfWeek=c.DayOfWeek.Sunday;
this._lastDayOfWeek=c.DayOfWeek.Saturday;
this._advancedFormSettings={enabled:true,modal:false,zIndex:2500};
this._weekViewSettings=[];
this._dayViewSettings=[];
this._multiDayViewSettings=[];
this._monthViewSettings=[];
this._timelineViewSettings=[];
this._modelData=null;
this._schedulerRendered=null;
this._repainting=false;
};
c.RadScheduler._plugins=[];
c.RadScheduler._incrementTime=function(k,m,n){if(isNaN(n)){n=0;
}var j=k.getTimezoneOffset();
k.setTime(k.getTime()+(m*3600000)+(n*60000));
var l=k.getTimezoneOffset();
k.setTime(k.getTime()+((l-j)*60000));
};
c.RadScheduler._getScrollBarWidth=function(){if(c.RadScheduler._scrollbarWidth){return c.RadScheduler._scrollbarWidth;
}var n,o=0;
var j=document.createElement("div");
j.style.position="absolute";
j.style.top="-1000px";
j.style.left="-1000px";
j.style.width="100px";
j.style.height="50px";
j.style.overflow="hidden";
var k=document.createElement("div");
k.style.width="100%";
k.style.height="200px";
j.appendChild(k);
document.body.appendChild(j);
var l=k.offsetWidth;
j.style.overflow="auto";
var m=k.offsetWidth;
c.RadScheduler._scrollbarWidth=l-m;
if(c.RadScheduler._scrollbarWidth<=0){k.style.width="300px";
n=j.offsetWidth;
o=j.clientWidth;
c.RadScheduler._scrollbarWidth=n-o;
}if(c.RadScheduler._scrollbarWidth<=0){c.RadScheduler._scrollbarWidth=16;
}document.body.removeChild(document.body.lastChild);
return c.RadScheduler._scrollbarWidth;
};
c.RadScheduler._preInitialize=function(m,n,k,o,j){var l=b("#"+m);
if(l[0]._preInitialized&&!$telerik.isIE){return;
}Telerik.Web.UI.RadScheduler._adjustContentDimensions(l,n,k,o,j);
l[0].style.cssText=l[0].style.cssText;
c.RadScheduler._recalcAppointmentWidth();
l[0]._preInitialized=true;
};
c.RadScheduler._recalcAppointmentWidth=function(j){b("table.rsAllDayTable div.rsApt",j).eachCallback(function(){var x=this;
var m=b(x).parents("table.rsAllDayTable:first");
if(m.length==0){return;
}var t=m[0].style.width;
var u=t.endsWith("px");
var y=x.style.width;
var k=y.endsWith("px");
if(u&&k){return;
}if(!u){if(k){x.width=x.originalWidth;
y=x.originalWidth;
}else{x.originalWidth=y;
}}var r=x.parentNode.parentNode;
if(!r||!r.tagName||r.tagName.toUpperCase()!="TD"){return;
}var p=r.parentNode;
var v=parseInt(y,10)/100;
var n=Math.floor(v);
var l=x.offsetLeft;
var s=r.cellIndex+n-1;
if(s<0||s>p.cells.length-1){return;
}var z=p.cells[s];
var o=z.offsetLeft+z.offsetWidth;
var q=o-r.offsetLeft-l;
if(q<=0){return;
}var w=v%1;
if(w>0||l>0){var A=w*r.offsetWidth+l;
q+=A;
}x.style.width=q+"px";
});
};
c.RadScheduler._scrollVerticalArea=function(k,j){if(k.length){k.parent().scrollTop(j);
}};
c.RadScheduler._adjustContentDimensions=function(j,l,n,t,p){var k=j.find("div.rsTopWrap");
var m={scheduler:j,schedulerTopWrap:k,contentWrapper:k.find("td.rsContentWrapper"),verticalHeaderWrapper:k.find("td.rsVerticalHeaderWrapper")};
var o=c.RadScheduler._getScrollBarWidth();
if(p){k.find("table.rsVerticalHeaderTable").css("margin-bottom",o+"px");
}c.RadScheduler._adjustContentWidth(m);
if(t==1){c.RadScheduler._adjustContentHeight(m,p);
k.find("td.rsHorizontalHeaderWrapper").children().children().css("margin-right",o+"px");
}var r=k.find("div.rsContentScrollArea");
if(r.length){var q=k.find(".rsVerticalHeaderTable");
c.RadScheduler._scrollVerticalArea(q,l);
r.scrollTop(l).scrollLeft(n);
var s=k.find("td.rsHorizontalHeaderWrapper").children().children();
if($telerik.isIE6){s.css("margin-left",n+"px");
}else{s.scrollLeft(n);
}}c.InlineTemplate._positionForm(j[0].id);
};
c.RadScheduler._adjustContentHeight=function(k,j){var m=b("div.rsHeader, div.rsFooter, td.rsHorizontalHeaderWrapper",k.schedulerTopWrap);
m=m.filter(":visible");
var n=k.scheduler.height();
b.each(m,function(){n-=b(this).outerHeight();
});
var p=0;
b("table.rsContentTable, table.rsAllDayTable",k.contentWrapper).each(function(){if(b(this).parents().is(".rsHorizontal")){p=b(this).outerHeight();
}else{p+=b(this).outerHeight();
}});
var l=j?c.RadScheduler._getScrollBarWidth():0;
p+=l;
var q=1;
if(p>=n){n-=q;
}else{n=p;
}b(k.contentWrapper).add(k.contentWrapper.children(":first")).height(n);
var o=j?n-l:n;
b(k.verticalHeaderWrapper).add(k.verticalHeaderWrapper.children(":first")).height(o);
};
c.RadScheduler._adjustContentWidth=function(k){var m=k.contentWrapper.add(k.schedulerTopWrap.find("td.rsHorizontalHeaderWrapper").children().get()).add(k.contentWrapper.children()[0]);
var n=k.schedulerTopWrap.outerWidth()-k.schedulerTopWrap.width();
if($telerik.isIE){if(k.scheduler.width()-n!=0){k.scheduler.css("overflow-x","hidden");
k.schedulerTopWrap.width(k.scheduler.width()-n);
k.scheduler.css("overflow-x","");
}}else{k.schedulerTopWrap.width(k.scheduler.width()-n);
}m.width("100%");
var l=k.scheduler.width()-k.verticalHeaderWrapper.width();
m.width(l-2);
var j=k.contentWrapper.find(".rsArrowContainer");
if(j.length>0){j.width(k.contentWrapper.find(".rsContentTable").width());
}};
c.RadScheduler._clearSelection=function(){if(document.selection&&document.selection.empty){document.selection.empty();
}else{if(window.getSelection&&window.getSelection().removeAllRanges){window.getSelection().removeAllRanges();
}}};
c.RadScheduler.prototype={initialize:function(){var m=this.get_element();
var j=b(m);
c.RadScheduler.callBaseMethod(this,"initialize");
this._activeModel=this._getModelFactory(this._selectedView).createModel();
this._activeModel.initialize();
this._eventMap.initialize(this);
this.updateClientState();
this._updateScrollAreas();
var l=!this._webServiceSettings.get_isEmpty();
if(!l&&b(".rsAdvancedEdit",m).length>0){var k=b(".rsAdvancedEdit",m)[0];
if(c.Scheduling!=a&&c.Scheduling.AdvancedTemplate!=a&&this._defaultAdvancedFormRendered){var n=this._isSchedulerContentRendered();
this._advancedTemplate=new c.Scheduling.AdvancedTemplate(m,k,n);
}this._makeModal(k);
this._initializeAdvancedTemplateCallback=Function.createDelegate(this,this._initializeAdvancedTemplate);
Sys.Application.add_load(this._initializeAdvancedTemplateCallback);
}if(this._isSchedulerContentRendered()){this._eventMap.addHandlerForClassName("mousemove","rsContent",this._onContentScroll);
this._eventMap.addHandlerForClassName("dblclick","rsAptEdit",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("dblclick","rsApt",this._onAppointmentDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsContentTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsAllDayTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsTimelineTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("click","rsAptResize",this._onResizeGripMouseClick);
this._eventMap.addHandlerForClassName("click","rsApt",this._onAppointmentClick);
this._eventMap.addHandlerForClassName("click","rsAptDelete",this._onAppointmentDeleteClick);
this._eventMap.addHandlerForClassName("click","rsArrowTop",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowBottom",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowLeft",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowRight",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsNextDay",this._onNextSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsPrevDay",this._onPreviousSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsToday",this._onTodayClick);
this._eventMap.addHandlerForClassName("click","rsFullTime",this._onFullTimeLinkClick);
this._eventMap.addHandlerForClassName("click","rsOvertimeArrow",this._onFullTimeLinkClick);
this._eventMap.addHandlerForClassName("click","rsAptEdit",this._onEditFormClick);
this._eventMap.addHandlerForClassName("click","rsShowMore",this._onDateClick);
this._eventMap.addHandlerForClassName("click","rsDateHeader",this._onDateClick);
this._eventMap.addHandlerForClassName("click","rsHeaderDay",this._onDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderWeek",this._onWeekViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMonth",this._onMonthViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderTimeline",this._onTimelineViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMultiDay",this._onMultiDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsContentTable",this._onCellClick);
this._eventMap.addHandlerForClassName("click","rsAllDayTable",this._onCellClick);
this._eventMap.addHandlerForClassName("click","rsDatePickerActivator",this._onDatePickerToggle);
this._eventMap.addHandlerForClassName("mouseover","rsAllDayTable",this._onRowMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsContentTable",this._onRowMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsAllDayCell",this._onAllDayCellMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsApt",this._onAppointmentMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsAptResize",this._onResizeGripMouseOver);
this._eventMap.addHandlerForClassName("mouseout","rsContent",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsAllDayCell",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsApt",this._onAppointmentMouseOut);
this._eventMap.addHandlerForClassName("mousedown","rsAptDelete",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("mousedown","rsApt",this._onAppointmentMouseDown);
this._eventMap.addHandlerForClassName("mousedown","rsAptResize",this._onResizeGripMouseDown);
this._eventMap.addHandlerForClassName("mouseup","rsContent",this._endDrag);
this._eventMap.addHandlerForClassName("contextmenu","rsApt",this._onAppointmentContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsContent",this._onCellContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsAllDayCell",this._onCellContextMenu);
this._updateContentScrollArea(j);
this._onKeyboardEventDelegate=Function.createDelegate(this,this._onKeyboardEvent);
$addHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
this._onDocumentMouseOutDelegate=Function.createDelegate(this,this._onDocumentMouseOut);
$addHandler(document.documentElement,"mouseout",this._onDocumentMouseOutDelegate);
this._onContentScroll();
this._initializeIndicators();
this._applicationLoadedCallback=Function.createDelegate(this,this._applicationLoaded);
Sys.Application.add_load(this._applicationLoadedCallback);
}this._onResizeGripMouseMoveDelegate=Function.createDelegate(this,this._onResizeGripMouseMove);
this._onResizeGripMouseUpDelegate=Function.createDelegate(this,this._onResizeGripMouseUp);
this._onSelectStartDelegate=Function.createDelegate(this,this._onSelectStart);
this._onDocMouseUpDelegate=Function.createDelegate(this,this._onDocMouseUp);
this._onDocumentMouseMoveDelegate=Function.createDelegate(this,this._onDocumentMouseMove);
this._getInlineTemplate();
this._initializeRenderingManager();
this._initializePlugins();
this._onWindowResizeDelegate=Function.createDelegate(this,this.repaint);
$addHandler(window,"resize",this._onWindowResizeDelegate);
},_initializeIndicators:function(){if(!this._modelData){return;
}if(this.get_activeModel()._settings&&this.get_activeModel()._settings.hiddenAptsIndicator===false){return;
}this._modelData=eval("("+this._modelData+")");
this._setIndicatorState(this._modelData.aptIndicators);
},_initializePlugins:function(){var j=this;
b.each(c.RadScheduler._plugins,function(){this.onInitialize.call(j);
});
},_isSchedulerContentRendered:function(){if(this._schedulerRendered===null){this._schedulerRendered=b(".rsTopWrap",this.get_element()).length>0;
}return this._schedulerRendered;
},_updateContentScrollArea:function(j){this._clearScrollAreaHandlers();
this._contentScrollArea=j.find("div.rsContentScrollArea")[0];
if(this._contentScrollArea){this._onContentScrollDelegate=Function.createDelegate(this,this._onContentScroll);
$addHandler(this._contentScrollArea,"scroll",this._onContentScrollDelegate);
}},_updateScrollAreas:function(){var j=b(this.get_element());
this._updateContentScrollArea(j);
this._horizontalScrollAreas=j.find(".rsTopWrap td.rsHorizontalHeaderWrapper").children().children();
this._verticalScrollAreas=j.find(".rsTopWrap .rsVerticalHeaderTable");
},_applicationLoaded:function(){Sys.Application.remove_load(this._applicationLoadedCallback);
if(!this.get_element()){return;
}this.repaint();
this.initializeDatePicker();
},initializeDatePicker:function(){var j=$find(this.get_element().id+"_SelectedDateCalendar");
if(!j){return;
}j.add_dateSelecting(Function.createDelegate(this,this._calendarDateChanging));
j.add_calendarViewChanged(Function.createDelegate(this,this._calendarViewChanged));
if(this._renderingManager){j.set_autoPostBack(false);
j.add_dateSelected(Function.createDelegate(this,this._calendarDateChanged));
}else{j.add_calendarViewChanging(function(k){k.set_autoPostBack(false);
});
j.add_calendarViewChanged(function(k){k.set_autoPostBack(true);
});
}},_calendarDateChanging:function(j,n){var l=n.get_renderDay().get_date();
var m=new Date(l[0],l[1]-1,l[2]);
var k=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.NavigateToSelectedDate,m);
this.raiseEvent("NavigationCommand",k);
if(k.get_cancel()){n.set_cancel(true);
this._onDatePickerToggle();
}},_calendarDateChanged:function(j){var k=j.get_selectedDates();
if(k.length>0){var m=k[0];
var l=new Date(m[0],m[1]-1,m[2]);
this.set_selectedDate(l);
this._onDatePickerToggle();
this.raiseEvent("NavigationComplete",new d.NavigationCompleteEventArgs(c.SchedulerNavigationCommand.NavigateToSelectedDate));
}},_calendarViewChanged:function(j){var k=b("div.rsDatePickerWrapper div:first",this.get_element());
var l=b("table:first",k);
k.css({height:l.height()+"px"});
},_initializeAdvancedTemplate:function(){if(this._advancedTemplate){this._advancedTemplate.initialize();
}this._fireFormCreated(this.get_currentAppointment(),this._formContainerMode,this._editingRecurringSeries);
try{if(this._defaultAdvancedFormRendered){b(".rsAdvFormWrap .riTextBox:first",this.get_element())[0].focus();
}}catch(j){}Sys.Application.remove_load(this._initializeAdvancedTemplateCallback);
},_initializeRenderingManager:function(){if(!this._webServiceSettings.get_isEmpty()){this._renderingManager=new c.Scheduler.Rendering.RenderingManager(this,this._webServiceSettings);
this._renderingManager.add_appointmentsReceived(Function.createDelegate(this,this._onWebServiceAppointmentsReceived));
this._renderingManager.add_appointmentsPopulated(Function.createDelegate(this,this._onWebServiceAppointmentsPopulated));
this._renderingManager.initialize();
}},_onWebServiceAppointmentsPopulated:function(){this._raiseAppointmentsPopulated();
if(!this._activeModel._getRenderer){return;
}var j=this._activeModel._getRenderer();
if(j&&j.refreshIndicatorState){j.refreshIndicatorState();
}},_onWebServiceAppointmentsReceived:function(){this.get_appointments()._clear();
if(this._newActiveModel){this._activeModel=this._newActiveModel;
this._newActiveModel=null;
}if(!this._activeModel._getRenderer){return;
}var j=this._activeModel._getRenderer();
if(j){j.refreshView();
this._updateScrollAreas();
}},dispose:function(){if(this._advancedInsertTemplate&&this._advancedInsertTemplate.dispose){this._advancedInsertTemplate.dispose();
}if(this._advancedEditTemplate&&this._advancedEditTemplate.dispose){this._advancedEditTemplate.dispose();
}if(this._onWindowResizeDelegate){$removeHandler(window,"resize",this._onWindowResizeDelegate);
}if(this._onKeyboardEventDelegate){$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
}if(this._onDocumentMouseOutDelegate){$removeHandler(document.documentElement,"mouseout",this._onDocumentMouseOutDelegate);
}var j=this.get_contentElement();
if(j){$clearHandlers(j);
}this._clearScrollAreaHandlers();
this._eventMap.dispose();
this._modelTables=null;
this._resizingState=null;
if(this._inlineTemplate){this._inlineTemplate.dispose();
}if(this._popupDialog){this._popupDialog.close();
}this._disposePlugins();
c.RadScheduler.callBaseMethod(this,"dispose");
},_disposePlugins:function(){var j=this;
b.each(c.RadScheduler._plugins,function(){this.onDispose.call(j);
});
},_clearScrollAreaHandlers:function(){if(this._contentScrollArea){$clearHandlers(this._contentScrollArea);
}},repaint:function(){if(this._repainting){return;
}this._repainting=true;
c.RadScheduler._adjustContentDimensions(b(this.get_element()),this.get_scrollTop(),this.get_scrollLeft(),this.get_overflowBehavior(),this._useHorizontalScrolling);
this._repaintAdvancedTemplate();
this._initializeModelTables();
c.RadScheduler._recalcAppointmentWidth(this.get_element());
this._repainting=false;
},_repaintAdvancedTemplate:function(){if(this.get_overflowBehavior()==1&&!this._advancedFormSettings.modal){if(typeof(c.Scheduling)!="undefined"&&typeof(c.Scheduling.AdvancedTemplate)!="undefined"){c.Scheduling.AdvancedTemplate._adjustHeight($get(this.get_id()));
}}},get_appointments:function(){return this._appointments;
},set_appointments:function(m){this._appointments=new c.SchedulerAppointmentCollection(this);
var j=eval("("+m+")");
for(var k=0;
k<j.length;
k++){var l=new c.SchedulerAppointment(j[k],this);
this._appointments.add(l);
}},get_resources:function(){return this._resources;
},set_resources:function(k){var j=Sys.Serialization.JavaScriptSerializer.deserialize(k);
for(var l=0;
l<j.length;
l++){var m=new c.SchedulerResource(j[l]);
this._resources.add(m);
}},get_resourceTypes:function(){return this._resourceTypes;
},set_resourceTypes:function(m){var j=Sys.Serialization.JavaScriptSerializer.deserialize(m);
for(var l=0;
l<j.length;
l++){var k=new c.ResourceType(j[l]);
this._resourceTypes.add(k);
}},get_resourceStyles:function(){if(!this._resourceStyles){if(c.ResourceStyleMappingCollection){this._resourceStyles=new c.ResourceStyleMappingCollection();
}else{return null;
}}return this._resourceStyles;
},set_resourceStyles:function(j){var k=eval("("+j+")");
var n=this.get_resourceStyles();
for(var l=0;
l<k.length;
l++){var m=new c.ResourceStyleMapping(k[l],this);
n.add(m);
}},get_firstDayStart:function(){return this._firstDayStart;
},set_firstDayStart:function(j){this._firstDayStart=new Date(Date.parse(j));
},get_currentAppointment:function(){return this._currentAppointment;
},set_currentAppointment:function(j){var k=Sys.Serialization.JavaScriptSerializer.deserialize(j);
this._currentAppointment=new c.SchedulerAppointment(k,this);
},get_localization:function(){return this._localization;
},set_localization:function(j){this._localization=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_scrollTop:function(){return this._scrollTop;
},set_scrollTop:function(j){this._scrollTop=j;
},get_scrollLeft:function(){return this._scrollLeft;
},set_scrollLeft:function(j){this._scrollLeft=j;
},get_displayDeleteConfirmation:function(){return this._displayDeleteConfirmation;
},set_displayDeleteConfirmation:function(j){this._displayDeleteConfirmation=j;
},get_displayRecurrenceActionDialogOnMove:function(){return this._displayRecurrenceActionDialogOnMove;
},set_displayRecurrenceActionDialogOnMove:function(j){this._displayRecurrenceActionDialogOnMove=j;
},get_shouldPostbackOnClick:function(){return this._shouldPostbackOnClick;
},set_shouldPostbackOnClick:function(j){this._shouldPostbackOnClick=j;
},get_shouldUseClientInlineInsertForm:function(){return this._shouldUseClientInlineInsertForm;
},set_shouldUseClientInlineInsertForm:function(j){this._shouldUseClientInlineInsertForm=j;
},get_shouldUseClientInlineEditForm:function(){return this._shouldUseClientInlineEditForm;
},set_shouldUseClientInlineEditForm:function(j){this._shouldUseClientInlineEditForm=j;
},get_overflowBehavior:function(){return this._overflowBehavior;
},set_overflowBehavior:function(j){this._overflowBehavior=j;
},get_readOnly:function(){return this._readOnly;
},set_readOnly:function(j){this._readOnly=j;
},get_selectedView:function(){return this._selectedView;
},set_selectedView:function(m,n){this._selectedView=m;
if(this._renderingManager){this._newActiveModel=this._getModelFactory(this._selectedView).createModel();
this._newActiveModel.initialize();
if(!n){var l={};
var k=c.SchedulerViewType;
var j=c.SchedulerNavigationCommand;
l[k.DayView]=j.SwitchToDayView;
l[k.WeekView]=j.SwitchToWeekView;
l[k.MonthView]=j.SwitchToMonthView;
l[k.TimelineView]=j.SwitchToTimelineView;
l[k.MultiDayView]=j.SwitchToMultiDayView;
this.raiseEvent("NavigationComplete",new d.NavigationCompleteEventArgs(l[m]));
}}this.raisePropertyChanged("selectedView");
},get_minutesPerRow:function(){return this._minutesPerRow;
},set_minutesPerRow:function(j){this._minutesPerRow=j;
},get_timeLabelRowSpan:function(){return this._timeLabelRowSpan;
},set_timeLabelRowSpan:function(j){this._timeLabelRowSpan=j;
this.raisePropertyChanged("timeLabelRowSpan");
},get_hoursPanelTimeFormat:function(){return this._hoursPanelTimeFormat||"htt";
},set_hoursPanelTimeFormat:function(j){this._hoursPanelTimeFormat=j;
},get_postBackReference:function(){return this._postBackReference;
},set_postBackReference:function(j){this._postBackReference=j;
},get_allowEdit:function(){return this._allowEdit;
},set_allowEdit:function(j){this._allowEdit=j;
},get_allowDelete:function(){return this._allowDelete;
},set_allowDelete:function(j){this._allowDelete=j;
},get_allowInsert:function(){return this._allowInsert;
},set_allowInsert:function(j){this._allowInsert=j;
},get_attributes:function(){return this._attributes;
},set_attributes:function(j){this._attributes._load(j);
},get_customAttributeNames:function(){return this._customAttributeNames;
},set_customAttributeNames:function(j){this._customAttributeNames=j;
},get_activeModel:function(){return this._activeModel;
},set_numberOfHoveredRows:function(j){this._numberOfHoveredRows=j;
},get_numberOfHoveredRows:function(){return this._numberOfHoveredRows;
},set_groupBy:function(j){this._groupBy=j;
},get_groupBy:function(){return this._groupBy;
},get_contentElement:function(){return $telerik.getElementByClassName(this.get_element(),"rsContent","div");
},get_rowHeight:function(){return this._rowHeight;
},set_rowHeight:function(j){this._rowHeight=j;
},get_height:function(){return b(this.get_element()).css("height");
},set_height:function(j){this.get_element().style.height=j;
this.repaint();
},get_minimumInlineFormWidth:function(){return this._minimumInlineFormWidth;
},set_minimumInlineFormWidth:function(j){this._minimumInlineFormWidth=j;
},get_minimumInlineFormHeight:function(){return this._minimumInlineFormHeight;
},set_minimumInlineFormHeight:function(j){this._minimumInlineFormHeight=j;
},get_validationGroup:function(){return this._validationGroup||this.get_id();
},set_validationGroup:function(j){this._validationGroup=j;
},get_webServiceSettings:function(){return this._webServiceSettings;
},set_webServiceSettings:function(j){var k=Sys.Serialization.JavaScriptSerializer.deserialize(j);
this._webServiceSettings=new c.SchedulerWebServiceSettings(k);
},get_selectedDate:function(){return this._selectedDate;
},set_selectedDate:function(j){var k;
if(j instanceof Date){k=j;
}else{k=new Date(j);
}if(k!=null&&k!=NaN&&k!="Invalid Date"){this._selectedDate=k;
this.raisePropertyChanged("selectedDate");
}},get_showFullTime:function(){return this._showFullTime;
},set_showFullTime:function(j){if(this._renderingManager&&j!=this._showFullTime){if(j){this.get_activeModel()._getRenderer().showFullTime();
this._showFullTime=true;
}else{this.get_activeModel()._getRenderer().showBusinessTime();
this._showFullTime=false;
}this._renderingManager.loadAppointments(false);
this.repaint();
}else{this._showFullTime=j;
}},get_showAllDayRow:function(){return this._showAllDayRow;
},set_showAllDayRow:function(j){this._showAllDayRow=j;
},get_firstDayOfWeek:function(){return this._firstDayOfWeek;
},set_firstDayOfWeek:function(j){this._firstDayOfWeek=j;
},get_lastDayOfWeek:function(){return this._lastDayOfWeek;
},set_lastDayOfWeek:function(j){this._lastDayOfWeek=j;
},get_weekViewSettings:function(){return this._weekViewSettings;
},set_weekViewSettings:function(j){this._weekViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_dayViewSettings:function(){return this._dayViewSettings;
},set_dayViewSettings:function(j){this._dayViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_monthViewSettings:function(){return this._monthViewSettings;
},set_monthViewSettings:function(j){this._monthViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_multiDayViewSettings:function(){return this._multiDayViewSettings;
},set_multiDayViewSettings:function(j){this._multiDayViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_timelineViewSettings:function(){return this._timelineViewSettings;
},set_timelineViewSettings:function(j){this._timelineViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_advancedFormSettings:function(){return this._advancedFormSettings;
},set_advancedFormSettings:function(j){for(var k in j){this._advancedFormSettings[k]=j[k];
}},showInlineInsertForm:function(o){if(this._renderingManager&&this._startInsertingInAdvancedForm){var j=this._createAppointmentFromTimeSlot(o);
this._showAdvancedInsertForm(j);
return;
}if(this.get_shouldUseClientInlineInsertForm()||this._renderingManager){if(this._datePickerCalendarExpanded){this._onDatePickerToggle();
}var j=this._createAppointmentFromTimeSlot(o);
var m=this._getInlineTemplate();
m.instantiateIn(o.get_domElement());
m.set_text("");
m.set_start(j.get_start());
m.set_end(j.get_end());
m.set_isInsert(true);
this._fireFormCreated(j,c.SchedulerFormMode.Insert);
return;
}var k=o.get_domElement().offsetWidth;
var n=o.get_domElement().offsetHeight;
var l={command:"Insert",appointmentID:-1,targetSlotIndex:o.get_index(),slotWidth:k,slotHeight:n};
this.postback(l);
},showInsertFormAt:function(j){this.showInlineInsertForm(j);
},showAllDayInlineInsertForm:function(m){var j=new Date(m.getFullYear(),m.getMonth(),m.getDate());
var k=new f(j).add(g).toDate();
var n=new c.SchedulerAppointment();
n.set_start(j);
n.set_end(k);
var l=this.get_activeModel().getTimeSlotForAppointment(n);
this.showInlineInsertForm(l);
},showInlineEditForm:function(j,l){var p=j.get_element().parentNode.parentNode;
if(this._renderingManager&&this._startEditingInAdvancedForm){this.showAdvancedEditForm(j,l);
return;
}if(this.get_shouldUseClientInlineEditForm()||this._renderingManager){if(this._datePickerCalendarExpanded){this._onDatePickerToggle();
}var o=this._getInlineTemplate();
o.instantiateIn(j.get_element());
o.set_appointmentInternalID(j._internalID);
o.set_text(j.get_subject());
o.set_start(j.get_start());
o.set_end(j.get_end());
o.set_editSeries(l);
o.set_isInsert(false);
this._fireFormCreated(j,c.SchedulerFormMode.Edit,l);
return;
}var m=p.offsetWidth;
var n=p.offsetHeight;
var k={command:"Edit",appointmentID:j._internalID,editSeries:l,slotWidth:m,slotHeight:n};
this.postback(k);
},showAdvancedInsertForm:function(k){var j=f.add(k,this.get_minutesPerRow()*i);
var l=new c.SchedulerAppointment();
l.set_subject("");
l.set_start(k);
l.set_end(j);
this._showAdvancedInsertForm(l);
},showAllDayAdvancedInsertForm:function(l){var j=new Date(l.getFullYear(),l.getMonth(),l.getDate());
var k=f.add(j,g);
var m=new c.SchedulerAppointment();
m.set_subject("");
m.set_start(j);
m.set_end(k);
this._showAdvancedInsertForm(m);
},showAdvancedEditForm:function(j,k){if(this._renderingManager){this._showAdvancedFormWrapper(b("div.rsAdvancedEditWrapper",this.get_element()));
this._advancedTemplate=this._getAdvancedEditTemplate();
this._fireFormCreated(j,c.SchedulerFormMode.AdvancedEdit,k);
if(this._advancedTemplate){this._advancedTemplate.populate(j,false,k);
}return;
}var l={command:"AdvancedEdit",appointmentID:j._internalID,appointment:this._getSerializableAppointment(j),startDate:j.get_start().format("yyyyMMddHHmm"),endDate:j.get_end().format("yyyyMMddHHmm"),editSeries:k};
this.postback(l);
},hideAdvancedForm:function(){var k=this.get_element();
if(this._renderingManager){var j=b("> div.rsAdvancedEditWrapper, > div.rsAdvancedInsertWrapper",k);
if(j.parent().is(".rsHiddenAdvancedForm")){return;
}this._advancedTemplate=null;
b("div.rsHiddenAdvancedForm",k).append(j);
b("div.rsTopWrap",k).show();
}else{b("> .rsAdvFormWrap",k).hide();
}if(this._popupDialog){this._popupDialog.close();
}},hideInlineForm:function(){var j=this._getInlineTemplate();
if(j.get_element()){j.hide();
}},editAppointmentWithConfirmation:function(j){this._editAppointmentInline(j);
},editAppointment:function(j,k){this.showInlineEditForm(j,k);
},insertAppointment:function(j){if(this._renderingManager){this.get_appointments().add(j);
return;
}var k={command:"InsertAppointment",appointment:this._getSerializableAppointment(j),startDate:j.get_start().format("yyyyMMddHHmm"),endDate:j.get_end().format("yyyyMMddHHmm")};
this.postback(k);
},prepareToEdit:function(m,k){if(m.get_recurrenceState()!=c.RecurrenceState.NotRecurring){var j=m;
if(m.get_recurrenceParentID()){j=this.get_appointments().findByID(m.get_recurrenceParentID());
}if(k){return j;
}if(m.get_recurrenceState()!=c.RecurrenceState.Exception){var l=m.clone();
l._recurrenceParentID=j.get_id();
l._recurrenceRule="";
l._recurrenceState=c.RecurrenceState.Exception;
l.__newRecurrenceException=true;
return l;
}}return m;
},updateAppointment:function(j,k){if(this._renderingManager){this._renderingManager.updateAppointment(j);
return;
}var l={command:"UpdateAppointment",appointmentID:j._internalID,appointment:this._getSerializableAppointment(j),startDate:j.get_start().format("yyyyMMddHHmm"),endDate:j.get_end().format("yyyyMMddHHmm"),editSeries:k};
this.postback(l);
},deleteAppointmentWithConfirmation:function(j){this._deleteAppointment(j);
},deleteAppointment:function(j,k){if(this._renderingManager){this.get_appointments().remove(j,k);
return;
}var l={command:"Delete",appointmentID:j._internalID,editSeries:k};
this.postback(l);
},moveAppointment:function(l,m,n,o){if(this._renderingManager){var p=this.prepareToEdit(l,m);
var t=o.get_startTime();
var w=p.get_duration();
w=this.get_activeModel().getDurationOfMovedAppointment(l,n,o);
var q=f.subtract(t,l.get_start());
var v=f.add(p.get_start(),q);
var k=f.add(v,w);
p.set_start(v);
p.set_end(k);
if(n.get_resource){var r=p.get_resources();
var x=n.get_resource();
var j=r.getResourceByTypeAndKey(x.get_type(),x.get_key());
if(j){r.remove(j);
}var u=o.get_resource();
r.add(u);
}this._renderingManager.updateAppointment(p);
return;
}var s={Command:"Move",AppointmentID:l._internalID,EditSeries:m,SourceSlotIndex:n.get_index(),TargetSlotIndex:o.get_index()};
this.postback(s);
},resizeAppointment:function(j,l,n,k){if(this._renderingManager){var p=this.prepareToEdit(j,l);
var m=f.subtract(k.get_endTime(),j.get_start());
p.set_end(f.add(p.get_start(),m));
this._renderingManager.updateAppointment(p);
return;
}var o={Command:"Resize",AppointmentID:j._internalID,EditSeries:l,SourceSlotIndex:n.get_index(),TargetSlotIndex:k.get_index()};
this.postback(o);
},removeRecurrenceExceptions:function(j){if(this._renderingManager){this._renderingManager.removeRecurrenceExceptions(j);
}},getAppointmentDomElement:function(j){while(j&&!Sys.UI.DomElement.containsCssClass(j,"rsApt")){j=j.parentNode;
}return j;
},getAppointmentFromDomElement:function(n){if(!n){return null;
}var k=this.getAppointmentDomElement(n);
var o=this.get_appointments();
for(var l=0;
l<o.get_count();
l++){var m=o.getAppointment(l);
if(!m.get_element()){continue;
}for(var j=0;
j<m._domElements.length;
j++){if(k.id==m._domElements[j].id){return m;
}}}return null;
},displayToUtc:function(j){return f.add(j,-this._timeZoneOffset);
},utcToDisplay:function(j){return f.add(j,this._timeZoneOffset);
},saveClientState:function(){return'{"scrollTop":'+this._scrollTop+',"scrollLeft":'+this._scrollLeft+"}";
},rebind:function(){if(!this._renderingManager){return;
}this.hideInlineForm();
this.hideAdvancedForm();
this._renderingManager.loadAppointments();
},_createAppointmentFromTimeSlot:function(m){var j=m.get_startTime();
var k=m.get_endTime();
var n=this.get_activeModel();
if(n.getDurationOfInsertedAppointment){k=f.add(j,n.getDurationOfInsertedAppointment(m));
}var l=new c.SchedulerAppointment();
l.set_start(j);
l.set_end(k);
if(m.get_resource){l.get_resources().add(m.get_resource());
}return l;
},_getSerializableAppointment:function(j){return{ID:j._internalID,Subject:this._encodeString(j.get_subject()),Description:this._encodeString(j.get_description()),Resources:this._getSerializableResources(j.get_resources()),RecurrenceState:j.get_recurrenceState(),RecurrenceParentID:j.get_recurrenceParentID()};
},_encodeString:function(j){return encodeURIComponent((j||"").replace(/'/g,"&squote"));
},_getSerializableResources:function(m){var j=[];
for(var l=0;
l<m.get_count();
l++){var k=m.getResource(l);
j[j.length]={Key:k.get_key(),Text:k.get_text(),Type:k.get_type(),Available:k.get_available()};
}return j;
},_onAppointmentInserting:function(j){if(!this._renderingManager){return;
}j._setOwner(this);
if(!this.get_activeModel().isVisible(j)){j._visible=false;
}if(j.get_visible()){this._activeModel._getRenderer().renderAppointment(j);
if(j.get_visible()){this._raiseAppointmentCreated(j);
}}if(!this._suppressWebServiceCalls){this._renderingManager.insertAppointment(j);
}},_onAppointmentRemove:function(j,k){if(!this._renderingManager){return;
}this._activeModel._getRenderer().removeAppointment(j);
if(!this._suppressWebServiceCalls){this._renderingManager.deleteAppointment(j,k);
}},_onAppointmentsClear:function(){if(!this._renderingManager){return;
}var l=this.get_appointments();
for(var k=0,j=l.get_count();
k<j;
k++){this._activeModel._getRenderer().removeAppointment(l.getAppointment(k));
}},_fireFormCreated:function(k,n,m){var j=b("div.rsAptEditFormInner",this.get_element());
if(!j.length){j=b("div.rsAdvancedEdit:visible",this.get_element());
}if(j.length){var l=new c.SchedulerFormCreatedEventArgs(k,j[0],n,m);
this.raise_formCreated(l);
}},_onKeyboardEvent:function(j){if(j.keyCode==27){if(this._dragging){this._abortDrag(j,true);
}if(this._resizingState.resizing){this._restoreResizingAppointmentSize();
this._cleanupResize();
}}},_onDocumentMouseOut:function(k){if(!this._dragging||this._finishDragExecuting){return;
}var j=k.rawEvent.relatedTarget?k.rawEvent.relatedTarget:k.rawEvent.toElement;
if(!j){this._abortDrag(k,true);
}},_onDatePickerToggle:function(m){var j=b(this.get_element()).find("div.rsDatePickerWrapper");
var n=j.find("div:first");
var o=n.find("table:first");
var k=b(this.get_element()).find("a.rsDatePickerActivator");
var l=this.get_element().offsetWidth+"px";
n.stop().css({position:"absolute",overflow:"hidden",width:l}).css({width:o.width()+"px"});
j.css("overflow","visible");
if(!this._datePickerCalendarExpanded){this.hideInlineForm();
n.animate({height:o.height()+"px"},300,"easeInQuart");
k.addClass("rsDatePickerActivatorDown");
}else{n.animate({height:"0px"},300,"easeOutQuart",function(){j.css("overflow","hidden");
});
k.removeClass("rsDatePickerActivatorDown");
}this._datePickerCalendarExpanded=!this._datePickerCalendarExpanded;
if(m){m.preventDefault();
}return false;
},_onContentScroll:function(){var j=this._contentScrollArea;
if(!j){return;
}if(this._horizontalScrollAreas.length){if($telerik.isIE6){this._horizontalScrollAreas.css("margin-left",-j.scrollLeft+"px");
}else{this._horizontalScrollAreas.scrollLeft(j.scrollLeft);
}}c.RadScheduler._scrollVerticalArea(this._verticalScrollAreas,j.scrollTop);
var k=this._getInlineTemplate().get_element();
if(k&&k.detached){k.style.left=k.originalLeft-j.scrollLeft+"px";
}this._scrollLeft=j.scrollLeft;
this._scrollTop=j.scrollTop;
this.updateClientState();
},_onAppointmentClick:function(n){if(this._dragging){return;
}var o=new Date().getTime();
var j=100;
if($telerik.isIE&&o-this._resizingState.resizeTimestamp<j){return;
}var m=this.getAppointmentFromDomElement(n.eventMapTarget);
var k=new c.SchedulerAppointmentClickEventArgs(m,n);
this.raise_appointmentClick(k);
if(this.get_readOnly()&&this.get_shouldPostbackOnClick()){var l={Command:"Click",AppointmentID:m._internalID,EditSeries:false};
this.postback(l);
}},_onAppointmentContextMenu:function(k){var j=this.getAppointmentFromDomElement(k.eventMapTarget);
var l=new c.SchedulerAppointmentContextMenuEventArgs(j,k);
this.raise_appointmentContextMenu(l);
},_onEditFormClick:function(j){j.stopPropagation();
},_getHourCellFromDomElement:function(k){var j=k;
while(j.tagName.toLowerCase()!="th"){j=j.parentNode;
}return j;
},_onAllDayCellMouseOver:function(j){if(this._dragging&&this._draggingAppointment){j.eventMapTarget.lastChild.appendChild(this._draggingAppointment.get_element());
}this._onRowMouseOver(j);
},_onRowMouseOver:function(o){if(this._dragging||this._resizingState.resizing||this._getInlineTemplate()._resizing){return;
}this._removeRowHover();
var p=b(o.target);
while(!(p.is("td")&&p.parents("table:first").is(".rsContentTable, .rsAllDayTable"))){p=p.parent();
if(p.length==0){return;
}}var m=this.get_numberOfHoveredRows();
if(p.parents("table").is(".rsAllDayTable")||this.get_selectedView()==c.SchedulerViewType.MonthView){m=1;
}this._currentHoverCell=p[0];
var l=[this._currentHoverCell];
for(var n=1;
n<m;
n++){var k=this._getNextRowCell(l[n-1]);
if(k){l[n]=k;
}else{break;
}}this._hoveredCells=l;
var j=1;
b.each(this._hoveredCells,function(){b(this).addClass("rsAptCreate").addClass("rsAptCreateRow"+j++);
});
return true;
},_getParentTable:function(k){var j=k.parentNode;
while(j.tagName.toLowerCase()!="table"){j=j.parentNode;
}return j;
},_getNextRowCell:function(p){var o=p.parentNode;
var n=this._getParentTable(p);
var k=n.rows[o.rowIndex+1];
var j=null;
if(k){var m=k.cells.length;
var l=o.cells.length;
if(m==l){j=k.cells[p.cellIndex];
}else{if(m<l){j=k.cells[p.cellIndex-1];
}else{j=k.cells[p.cellIndex+1];
}}}return j;
},_onRowMouseOut:function(j){if(!this._currentHoverCell){return;
}if(!j.eventMapRelatedTarget||$telerik.isDescendant(this._currentHoverCell,j.eventMapRelatedTarget)){return;
}this._removeRowHover();
},_removeRowHover:function(){if(!this._hoveredCells){return;
}this._currentHoverCell=null;
var j=1;
b.each(this._hoveredCells,function(){b(this).removeClass("rsAptCreate").removeClass("rsAptCreateRow"+j++);
});
},_stopEventPropagation:function(j){j.stopPropagation();
},_onResizeGripMouseDown:function(m){if(this.get_readOnly()){return;
}this._resizingState.resizingElement=this.getAppointmentDomElement(m.eventMapTarget);
var k=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var l=(k.get_allowEdit()!=null)?k.get_allowEdit():this.get_allowEdit();
if(!l){return;
}var n=new c.SchedulerAppointmentResizeStartEventArgs(k);
this.raise_appointmentResizeStart(n);
if(!n.get_cancel()){this._resizingState.resizing=true;
this._resizingState.resizingAppointment=k;
var j=b(this._resizingState.resizingElement);
this._resizingState.originalSize={height:j.height(),width:j.width()};
$addHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStartDelegate);
}},_restoreResizingAppointmentSize:function(){if(!this._resizingState.originalSize){return;
}var k=this._resizingState.originalSize.height;
var l=this._resizingState.originalSize.width;
if($telerik.isIE6||$telerik.quirksMode){k-=h;
l-=h;
}var j=b(this._resizingState.resizingElement);
if(j.parents().is("table.rsAllDayTable")){j.width(l);
}else{j.height(k);
}b(".rsAptMid, .rsAptIn",j).css({width:""});
b(".rsAptOut, .rsAptMid, .rsAptIn, .rsAptContent",j).css({height:k});
this._resizingState.resizingElement=null;
this._resizingState.originalSize=null;
},_onResizeGripMouseMove:function(p){var n=this._resizingState.resizingElement;
if(!n){return;
}c.RadScheduler._clearSelection();
var j=n.parentNode.parentNode;
var o=10;
var r=this._getCellFromCoordinates(p.clientX,p.clientY-o);
if(!r){return;
}var m=this._activeModel.getTimeSlotFromDomElement(r);
var q=new c.SchedulerAppointmentResizingEventArgs(this._resizingState.resizingAppointment,m);
this.raise_appointmentResizing(q);
if(q.get_cancel()){return;
}var k=j.parentNode.parentNode.parentNode;
var l=r.parentNode.parentNode.parentNode;
if(k!=l){return;
}this._activeModel.updateResizingAppointmentSize(n,r);
this._keepElementInView(this._resizingState.resizingElement,true);
},_onSelectStart:function(j){$telerik.cancelRawEvent(j);
return false;
},_findResizeTargetSlot:function(m){var r=m.parentNode.parentNode;
var j=r.parentNode;
var n;
if(this.get_selectedView()==c.SchedulerViewType.TimelineView){var s=r.offsetWidth;
var t=Math.round(m.offsetWidth/s);
var o=r.cellIndex+t-1;
o=Math.min(o,j.cells.length-1);
n=j.cells[o];
}else{var p=m.parentNode.parentNode.offsetHeight;
var l=Math.ceil(m.offsetHeight/p);
var k=j.rowIndex+l-1;
k=Math.min(k,j.parentNode.rows.length-1);
var q=j.parentNode.rows[k];
n=q.cells[r.cellIndex];
}return this._activeModel.getTimeSlotFromDomElement(n);
},_onResizeGripMouseUp:function(o){if(!this._resizingState.resizingElement){return;
}var m=this._findResizeTargetSlot(this._resizingState.resizingElement);
var j=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var l=this._activeModel.getTimeSlotFromDomElement(j.get_element());
var q=m.get_endTime();
if(q.getTime()==j.get_end().getTime()){this._cleanupResize();
return;
}var p={OnConfirm:this._onAppointmentResizeCallback,OnCancel:this._onAppointmentResizeAbortCallback,Scheduler:this,Appointment:j,SourceSlot:l,TargetSlot:m,UpdatedEndDate:q,CallbackIsCalledFromDialog:true};
if(j._recurrenceState==1||j._recurrenceState==2){var n=new c.SchedulerRecurrenceActionDialogShowingEventArgs(p.Appointment,c.RecurrenceAction.Resize);
this.raise_recurrenceActionDialogShowing(n);
if(n.get_cancel()){var k=n.get_editSeries();
if(k!==null){p.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(k,p);
}else{this._onAppointmentResizeAbortCallback(p);
}}else{c.RecurrenceActionDialog.Show(c.RecurrenceAction.Resize,p);
}}else{p.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(false,p);
}o.stopPropagation();
this._cleanupResize();
},_cleanupResize:function(){this._resizingState.resizing=false;
this._resizingState.resizingAppointment=null;
this._resizingState.resizeTimestamp=new Date().getTime();
$removeHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$removeHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
},_onAppointmentResizeCallback:function(l,k){if(k.CallbackIsCalledFromDialog){var m=new c.SchedulerRecurrenceActionDialogClosedEventArgs(k.Appointment,c.RecurrenceAction.Resize,l);
k.Scheduler.raise_recurrenceActionDialogClosed(m);
}var j=new c.SchedulerAppointmentResizeEndEventArgs(k.Appointment,k.TargetSlot,k.UpdatedEndDate,l);
k.Scheduler.raise_appointmentResizeEnd(j);
if(!j.get_cancel()){k.Scheduler.resizeAppointment(k.Appointment,l,k.SourceSlot,k.TargetSlot);
}else{k.Scheduler._restoreResizingAppointmentSize();
}},_onAppointmentResizeAbortCallback:function(j){j.Scheduler._restoreResizingAppointmentSize();
},_onResizeGripMouseClick:function(j){j.stopPropagation();
},_onResizeGripMouseOver:function(j){j.stopPropagation();
},_initializeModelTables:function(){this._modelTables=[];
var j=this;
var k=j.get_element();
b(this.get_element()).find("div.rsTopWrap").find("table.rsAllDayTable, table.rsContentTable, table.rsTimelineTable").each(function(){var l=this;
l.targetRect=$telerik.getBounds(l);
var n=j._getTotalOffset(k);
l.targetRect.x-=n.left;
l.targetRect.y-=n.top;
j._compensateScrollOffset(l);
l.cellWidth=l.targetRect.width/l.rows[0].cells.length;
var m=[];
b.each(l.rows,function(){Array.add(m,this.cells[0].offsetHeight);
});
l.cellHeights=m;
Array.add(j._modelTables,l);
});
return this._modelTables;
},_compensateScrollOffset:function(l){var k=$telerik.getScrollOffset(l,true);
var j=$telerik.getScrollOffset(document.documentElement,false);
k.x-=j.x;
k.y-=j.y;
l.targetRect.x+=k.x;
l.targetRect.y+=k.y;
if($telerik.isSafari3){l.targetRect.x+=k.x;
l.targetRect.y+=k.y;
}},_getTotalOffset:function(m){var k=m.offsetTop;
var j=m.offsetLeft;
var l=m.offsetParent;
while(l){k+=l.offsetTop;
j+=l.offsetLeft;
l=l.offsetParent;
}return{top:k,left:j};
},_getCellFromCoordinates:function(r,q){if(!this.get_element()){return;
}var m=this._modelTables;
var l=b("#"+this.get_element().id+" div.rsContentScrollArea:first")[0];
var v=$telerik.getScrollOffset(l,true);
var p=this._getTotalOffset(this.get_element());
for(var j=0,t=m.length;
j<t;
j++){var n=r+v.x;
var o=q+v.y;
var z=m[j];
var A={x:z.targetRect.x+p.left,y:z.targetRect.y+p.top,width:z.targetRect.width,height:z.targetRect.height};
var s=A.y+A.height;
var u=A.x+A.width;
if(n>=A.x&&n<=u&&o>=A.y&&o<=s){var w=this._getRowIndex(o,z,A.y);
w=Math.min(z.rows.length-1,Math.max(0,w));
var k=parseInt((n-A.x)/z.cellWidth);
k=Math.min(z.rows[w].cells.length-1,Math.max(0,k));
return z.rows[w].cells[k];
}}return null;
},_getRowIndex:function(o,m,j){var p=0;
var k=m.cellHeights.length;
var n=j;
while(p<k){var l=n+m.cellHeights[p];
if(n<=o&&o<l){break;
}n=l;
p++;
}return p;
},_shouldStartDrag:function(j){if(!this._initialDragAppointment||!this._initialDragMousePos){return false;
}if(Math.abs(this._initialDragMousePos.x-j.x)>4||Math.abs(this._initialDragMousePos.y-j.y)>4){return true;
}},_onDocumentMouseMove:function(p){var r=this._getMousePosition(p);
if(!this._dragging&&this._shouldStartDrag(r)){this._startDrag(p);
}if(!this._dragging||!this._draggingAppointment){return;
}c.RadScheduler._clearSelection();
var l=this._draggingAppointment.get_element();
var s=this._getCellFromCoordinates(p.clientX,p.clientY-this._draggingOffset);
if(!s||!s.tagName||s.tagName.toLowerCase()!="td"||s.firstChild==l.parentNode){return;
}b(l.parentNode).removeClass(this._styles.dragTarget);
var k=b(s).find("div.rsWrap:first");
if(k.length==0){var o=b(s);
k=b(l.parentNode.cloneNode(false)).css({width:o.width(),height:"auto"});
if(s.innerHTML=="&nbsp;"){s.innerHTML="";
}else{k.css({position:"absolute",top:o[0].offsetTop,left:o[0].offsetLeft});
}k.appendTo(o);
}k.data("oldZIndex",k.css("zIndex")).css("zIndex",999);
this._restoreWrapZIndex(l.parentNode);
if(this._activeModel.updateDraggingAppointmentSize){this._activeModel.updateDraggingAppointmentSize(l,s,this._draggingAppointmentWidth);
}if(this.get_selectedView()!=c.SchedulerViewType.MonthView){var j=s.parentNode.parentNode.rows.length-s.parentNode.rowIndex;
var m=(j*parseInt(this.get_rowHeight()))-h;
m=Math.min(this._draggingAppointmentHeight,m);
b(l).height(m+"px");
k.append(l);
}else{if(s.childNodes[1]){s.childNodes[1].appendChild(l);
}}b(l.parentNode).addClass(this._styles.dragTarget).css("display","");
var n=this._activeModel.getTimeSlotFromDomElement(s);
var q=new c.SchedulerAppointmentMovingEventArgs(this._draggingAppointment,n);
this.raiseEvent("appointmentMoving",q);
if(q.get_cancel()){this._abortDrag(p);
}else{this._keepElementInView(l);
}return true;
},_restoreWrapZIndex:function(l){var k=b(l);
var j=k.data("oldZIndex");
if(j){k.css("zIndex",j);
}},_keepElementInView:function(k,j){this._keepElementInViewHorizontal(k,j);
this._keepElementInViewVertical(k,j);
},_keepElementInViewHorizontal:function(m,o){var j=b("#"+this.get_element().id+" div.rsContentScrollArea")[0];
var u=b("#"+this.get_element().id+" div.rsContent")[0];
var l=this._getRelativeOffset(j,u);
var n=this._getRelativeOffset(m,u);
n.left-=l.left;
n.top-=l.top;
var k=m.parentNode.parentNode.offsetWidth;
var q=n.left;
var t=m.offsetWidth;
var r=q+t;
var p=j.clientWidth+j.scrollLeft;
if(!o&&q<j.scrollLeft){j.scrollLeft=q;
}if(r>p){var s=j.scrollLeft+(r-p);
s=Math.min(s,j.clientWidth+s);
if(!o&&s>q){s=q;
}j.scrollLeft=s;
}if(o&&(r-k)<j.scrollLeft){j.scrollLeft=r-k;
}},_keepElementInViewVertical:function(m,o){var j=b("div.rsContentScrollArea",this.get_element())[0];
var u=b("div.rsContent",this.get_element().id)[0];
var l=this._getRelativeOffset(j,u);
var n=this._getRelativeOffset(m,u);
n.left-=l.left;
n.top-=l.top;
var q=m.parentNode.parentNode.offsetHeight;
var s=n.top;
var p=m.offsetHeight;
var t=s+p;
var k=j.clientHeight+j.scrollTop;
if(o){if(t>k){var r=j.scrollTop+(t-k);
if((j.clientHeight+r)>j.scrollHeight){return;
}j.scrollTop=r;
}if((t-q)<j.scrollTop){j.scrollTop=t-q;
}}else{if(s<j.scrollTop){j.scrollTop=Math.max(j.scrollTop-(q*2),0);
}if(s>k){j.scrollTop=Math.min(j.scrollTop+(q*2),j.scrollHeight);
}}},_getRelativeOffset:function(l,k){var n=l.offsetParent;
var j=l.offsetTop;
var m=l.offsetLeft;
while(n!=k){j+=n.offsetTop;
m+=n.offsetLeft;
if(!n.offsetParent){break;
}n=n.offsetParent;
}return{top:j,left:m};
},_getMousePosition:function(l){var j=$telerik.getScrollOffset(document.body,true);
var m=l.clientX;
var k=l.clientY;
m+=j.x;
k+=j.y;
return{x:m,y:k};
},_onAppointmentMouseDown:function(l){if(this.get_readOnly()){return;
}var j=this.getAppointmentFromDomElement(l.eventMapTarget);
var k=(j.get_allowEdit()!=null)?j.get_allowEdit():this.get_allowEdit();
if(!k){return;
}this._initialDragMousePos=this._getMousePosition(l);
this._initialDragAppointment=j;
$addHandler(document,"selectstart",this._onSelectStartDelegate);
$addHandler(document,"mouseup",this._onDocMouseUpDelegate);
$addHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=true;
},_startDrag:function(n){var j=this._initialDragAppointment;
var s=this._getCellFromCoordinates(n.clientX,n.clientY);
if(!s){return;
}var k=new c.SchedulerAppointmentMoveStartEventArgs(j);
this.raiseEvent("appointmentMoveStart",k);
if(k.get_cancel()){return;
}this._draggingAppointment=j;
this._draggingAppointmentHeight=b(j.get_element()).height();
this._draggingAppointmentWidth=b(j.get_element()).width();
this._dragging=true;
var r=this._draggingAppointment.get_element();
var o=$telerik.getLocation(r);
if($telerik.isFirefox||$telerik.isSafari){var q=$telerik.getScrollOffset(r,true);
o.x-=q.x;
o.y-=q.y;
if($telerik.isFirefox){o.x+=document.body.parentNode.scrollLeft;
o.y+=document.body.parentNode.scrollTop;
}else{o.x+=document.body.scrollLeft;
o.y+=document.body.scrollTop;
}}var p=$telerik.getLocation(s);
var m=n.clientY-o.y;
var l=n.clientY-p.y;
this._draggingOffset=m-l;
if($telerik.isFirefox&&document.compatMode=="BackCompat"){this._draggingOffset=0;
}if(this.get_selectedView()==c.SchedulerViewType.MonthView||this.get_selectedView()==c.SchedulerViewType.TimelineView){this._draggingOffset=0;
}j._startDrag();
},_endDrag:function(j){this._finishDrag(j,false);
},_onDocMouseUp:function(j){this._finishDrag(j,false);
},_abortDrag:function(k,j){this._finishDrag(k,true,j);
},_finishDrag:function(n,o,j){this._finishDragExecuting=true;
if(this._dragHandlersAttached){$removeHandler(document,"selectstart",this._onSelectStartDelegate);
$removeHandler(document,"mouseup",this._onDocMouseUpDelegate);
$removeHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=false;
}if(this._dragging){var k=this._draggingAppointment.get_element();
if(!o&&k.parentNode&&k.parentNode.parentNode){var l=k.parentNode.parentNode;
this._draggingAppointment._finishDrag(l);
}else{b(k).height(this._draggingAppointmentHeight).width(this._draggingAppointmentWidth);
this._restoreWrapZIndex(k.parentNode);
this._draggingAppointment._abortDrag();
this._draggingAppointment._raiseMoveEnd(j);
}var m=this;
window.setTimeout(function(){m._draggingAppointment=null;
m._dragging=false;
},0);
Sys.UI.DomElement.removeCssClass(k.parentNode,this._styles.dragTarget);
n.preventDefault();
n.stopPropagation();
}this._finishDragExecuting=false;
},_onAppointmentDoubleClick:function(l){if(this._resizingState.resizing){this._resizingState.resizing=false;
l.stopPropagation();
return;
}c.RadScheduler._clearSelection();
var j=this.getAppointmentFromDomElement(l.eventMapTarget);
var k=new c.SchedulerAppointmentDoubleClickEventArgs(j);
this.raise_appointmentDoubleClick(k);
this._editAppointmentInline(j);
$telerik.cancelRawEvent(l);
return false;
},_editAppointmentInline:function(j){if(this.get_readOnly()||!j){return;
}var l=(j.get_allowEdit()!=null)?j.get_allowEdit():this.get_allowEdit();
if(!l){return;
}var k={OnConfirm:this._onAppointmentEditCallback,Scheduler:this,Appointment:j,CallbackIsCalledFromDialog:true};
this._showEditConfirmationDialog(k);
},_showEditConfirmationDialog:function(j){if(j.Appointment._recurrenceState==1||j.Appointment._recurrenceState==2||j.Appointment._recurrenceState==3){var l=new c.SchedulerRecurrenceActionDialogShowingEventArgs(j.Appointment,c.RecurrenceAction.Edit);
this.raise_recurrenceActionDialogShowing(l);
if(l.get_cancel()){var k=l.get_editSeries();
if(k!==null){j.CallbackIsCalledFromDialog=false;
j.OnConfirm(k,j);
}}else{c.RecurrenceActionDialog.Show(c.RecurrenceAction.Edit,j);
}}else{j.CallbackIsCalledFromDialog=false;
j.OnConfirm(false,j);
}},_onAppointmentEditCallback:function(l,k){if(k.CallbackIsCalledFromDialog){var m=new c.SchedulerRecurrenceActionDialogClosedEventArgs(k.Appointment,c.RecurrenceAction.Edit,l);
k.Scheduler.raise_recurrenceActionDialogClosed(m);
}var j=new c.SchedulerAppointmentEditingEventArgs(k.Appointment,l);
k.Scheduler.raise_appointmentEditing(j);
if(!j.get_cancel()){k.Scheduler.editAppointment(k.Appointment,l);
}},_onDateClick:function(l){$telerik.cancelRawEvent(l);
var m=this._activeModel.getTimeSlotFromDomElement(l.eventMapTarget);
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchToSelectedDay,f.getDate(m.get_startTime()));
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedDate(f.getDate(m.get_startTime()));
this.set_selectedView(c.SchedulerViewType.DayView,true);
this.raiseEvent("NavigationComplete",new d.NavigationCompleteEventArgs(c.SchedulerNavigationCommand.SwitchToSelectedDay));
return;
}var k={Command:"SwitchToSelectedDay",SourceSlotIndex:m.get_index()};
this.postback(k);
return false;
},_onAppointmentMouseOver:function(l){if(this._resizingState.resizing||this._dragging){l.stopPropagation();
return;
}var k=this.getAppointmentDomElement(l.eventMapTarget);
var j=this.getAppointmentFromDomElement(k);
var n=(j.get_allowDelete()!=null)?j.get_allowDelete():this.get_allowDelete();
if(!n){return;
}this._hoveredAppointmentElement=k;
var m=$telerik.getElementByClassName(k,"rsAptDelete","a");
if(m){m.style.visibility="visible";
}},_onAppointmentMouseOut:function(l){var j=l.rawEvent.relatedTarget?l.rawEvent.relatedTarget:l.rawEvent.toElement;
if(!j){return;
}if($telerik.isDescendant(this._hoveredAppointmentElement,j)){return;
}var k=this.getAppointmentDomElement(l.eventMapTarget);
var m=$telerik.getElementByClassName(k,"rsAptDelete","a");
if(m){m.style.visibility="hidden";
}},_onCellClick:function(j){if(j.target.tagName.toUpperCase()=="TBODY"){return;
}var l=this._activeModel.getTimeSlotFromDomElement(j.target);
if(!l){return;
}var k=new c.SchedulerTimeSlotClickEventArgs(l.get_startTime(),l,j);
this.raise_timeSlotClick(k);
},_onCellContextMenu:function(j){var l=this._activeModel.getTimeSlotFromDomElement(j.target);
if(!l){return;
}var k=new c.SchedulerTimeSlotContextMenuEventArgs(l.get_startTime(),l.get_isAllDay(),j,l);
this.raise_timeSlotContextMenu(k);
},_onCellDoubleClick:function(j){if(!this.get_readOnly()&&this.get_allowInsert()){var l=this._activeModel.getTimeSlotFromDomElement(j.target);
var k=new c.SchedulerAppointmentInsertingEventArgs(l.get_startTime(),l.get_isAllDay(),l);
this.raise_appointmentInserting(k);
if(!k.get_cancel()){this.showInsertFormAt(l);
}}return false;
},_onAppointmentDeleteClick:function(k){if(!this.get_readOnly()){var j=this.getAppointmentFromDomElement(k.eventMapTarget);
this._deleteAppointment(j);
}k.preventDefault();
},_deleteAppointment:function(j){if(!j){return;
}var k={OnConfirm:this._onAppointmentDeleteCallback,Scheduler:this,Appointment:j,CallbackIsCalledFromDialog:true};
this._showDeleteConfirmationDialog(k);
},_showDeleteConfirmationDialog:function(j){if(j.Appointment._recurrenceState==1||j.Appointment._recurrenceState==2||j.Appointment._recurrenceState==3){var n=new c.SchedulerRecurrenceActionDialogShowingEventArgs(j.Appointment,c.RecurrenceAction.Delete);
this.raise_recurrenceActionDialogShowing(n);
if(n.get_cancel()){var l=n.get_editSeries();
if(l!==null){j.CallbackIsCalledFromDialog=false;
j.OnConfirm(l,j);
}}else{c.RecurrenceActionDialog.Show(c.RecurrenceAction.Delete,j);
}}else{if(this.get_displayDeleteConfirmation()){var m=this.get_localization();
var k=$telerik.$.modal("#"+this.get_element().id+">.rsTopWrap");
k.initialize().set_content({title:m.ConfirmDeleteTitle,content:m.ConfirmDeleteText,ok:m.ConfirmOK,cancel:m.ConfirmCancel}).set_onActionConfirm(function(){j.OnConfirm(false,j);
k.hide();
}).show();
}else{j.CallbackIsCalledFromDialog=false;
j.OnConfirm(false,j);
}}},_onAppointmentDeleteCallback:function(k,j){if(j.CallbackIsCalledFromDialog){var m=new c.SchedulerRecurrenceActionDialogClosedEventArgs(j.Appointment,c.RecurrenceAction.Delete,k);
j.Scheduler.raise_recurrenceActionDialogClosed(m);
}var l=new c.SchedulerAppointmentDeletingEventArgs(j.Appointment,k);
j.Scheduler.raise_appointmentDeleting(l);
if(!l.get_cancel()){j.Scheduler.deleteAppointment(j.Appointment,k);
}},_onPreviousDayClick:function(m){m.stopPropagation();
m.preventDefault();
var k=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.DisplayPreviousAppointmentSegment);
this.raiseEvent("NavigationCommand",k);
if(k.get_cancel()){return;
}if(this._renderingManager){return;
}var j=this.getAppointmentFromDomElement(m.eventMapTarget);
if(j){var l={Command:"GoToPrevious",AppointmentID:j._internalID};
this.postback(l);
}},_onNextDayClick:function(m){m.stopPropagation();
m.preventDefault();
var k=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.DisplayNextAppointmentSegment);
this.raiseEvent("NavigationCommand",k);
if(k.get_cancel()){return;
}if(this._renderingManager){return;
}var j=this.getAppointmentFromDomElement(m.eventMapTarget);
if(j){var l={Command:"GoToNext",AppointmentID:j._internalID};
this.postback(l);
}},_onDayViewTabClick:function(k){k.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchToDayView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(c.SchedulerViewType.DayView);
return;
}this.postback({Command:"SwitchToDayView"});
},_onWeekViewTabClick:function(l){l.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchToWeekView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(c.SchedulerViewType.WeekView);
return;
}var k={Command:"SwitchToWeekView"};
this.postback(k);
},_onMonthViewTabClick:function(l){l.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchToMonthView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(c.SchedulerViewType.MonthView);
return;
}var k={Command:"SwitchToMonthView"};
this.postback(k);
},_onTimelineViewTabClick:function(l){l.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchToTimelineView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(c.SchedulerViewType.TimelineView);
return;
}var k={Command:"SwitchToTimelineView"};
this.postback(k);
},_onMultiDayViewTabClick:function(l){l.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchToMultiDayView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){return;
}var k={Command:"SwitchToMultiDayView"};
this.postback(k);
},_onPreviousSchedulerDayClick:function(l){l.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.NavigateToPreviousPeriod);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedDate(this._activeModel.get_previousPeriodDate());
this.raiseEvent("NavigationComplete",new d.NavigationCompleteEventArgs(c.SchedulerNavigationCommand.NavigateToPreviousPeriod));
return;
}var k={Command:"NavigateToPreviousPeriod"};
this.postback(k);
},_onNextSchedulerDayClick:function(l){l.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.NavigateToNextPeriod);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedDate(this._activeModel.get_nextPeriodDate());
this.raiseEvent("NavigationComplete",new d.NavigationCompleteEventArgs(c.SchedulerNavigationCommand.NavigateToNextPeriod));
return;
}var k={Command:"NavigateToNextPeriod"};
this.postback(k);
},_onTodayClick:function(m){m.preventDefault();
var l=f.getDate(new Date());
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchToSelectedDay,l);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedDate(l);
this.raiseEvent("NavigationComplete",new d.NavigationCompleteEventArgs(c.SchedulerNavigationCommand.SwitchToSelectedDay));
return;
}var k={Command:"GoToToday"};
this.postback(k);
},_onFullTimeLinkClick:function(l){l.preventDefault();
var j=new d.NavigationCommandEventArgs(c.SchedulerNavigationCommand.SwitchFullTime);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){if(!this.get_activeModel()._isVertical){this.set_showFullTime(!this.get_showFullTime());
}this.raiseEvent("NavigationComplete",new d.NavigationCompleteEventArgs(c.SchedulerNavigationCommand.SwitchFullTime));
return;
}var k={Command:"SwitchFullTime"};
this.postback(k);
},postback:function(j){this._onContentScroll();
var k=this.get_postBackReference().replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(j));
eval(k);
},_getElementIndex:function(j,l){if(!j){return;
}for(var k=0;
k<j.length;
k++){if(j[k]===l){return k;
}}return -1;
},_getInlineTemplate:function(){if(!this._inlineTemplate){this._inlineTemplate=new c.InlineTemplate(this.get_element(),this.get_localization(),this._advancedFormSettings.enabled,this.get_minimumInlineFormWidth(),this.get_minimumInlineFormHeight());
var l=b("#"+this.get_element().id+" .rsAptEditSizingWrapper");
if(l.length){this._inlineTemplate.attachTo(l[0]);
}var k=Function.createDelegate(this,this._inlineFormSaveClicked);
this._inlineTemplate.add_saveClicked(k);
var j=Function.createDelegate(this,this._inlineFormMoreClicked);
this._inlineTemplate.add_moreClicked(j);
}return this._inlineTemplate;
},_inlineFormSaveClicked:function(j){var k=this._extractAppointmentFromInlineTemplate(j);
if(j.get_isInsert()){this.insertAppointment(k);
}else{this.updateAppointment(k,j.get_editSeries());
}},_inlineFormMoreClicked:function(j){var k=this._extractAppointmentFromInlineTemplate(j);
if(j.get_isInsert()){this._showAdvancedInsertForm(k);
}else{this.showAdvancedEditForm(k,j.get_editSeries());
}},_extractAppointmentFromInlineTemplate:function(j){var l=j.get_element();
if(l.originalParent){l=l.originalParent;
}var k=new c.SchedulerAppointment();
k._internalID=j.get_appointmentInternalID();
if(j.get_isInsert()){var m=this._activeModel.getTimeSlotFromDomElement(l);
if(m.get_resource){k.get_resources().add(m.get_resource());
}}else{var n=this.get_appointments().find(function(o){return o.get_internalID()==k.get_internalID();
});
if(this._renderingManager){k=this.prepareToEdit(n,j.get_editSeries());
}else{n.get_resources().forEach(function(o){k.get_resources().add(o);
});
}}k.set_subject(j.get_text());
k.set_start(j.get_start());
k.set_end(j.get_end());
return k;
},_showAdvancedInsertForm:function(j,l,m){if(this._renderingManager){this._showAdvancedFormWrapper(b("div.rsAdvancedInsertWrapper",this.get_element()));
this._advancedTemplate=this._getAdvancedInsertTemplate();
this._fireFormCreated(j,c.SchedulerFormMode.AdvancedInsert);
if(this._advancedTemplate){this._advancedTemplate.populate(j,true);
}return;
}var k={command:"AdvancedInsert",appointment:this._getSerializableAppointment(j),startDate:j.get_start().format("yyyyMMddHHmm"),endDate:j.get_end().format("yyyyMMddHHmm")};
if(l){k.command="AdvancedInsertRecurring";
k.targetSlotIndex=m.get_index();
}this.postback(k);
},_getAdvancedInsertTemplate:function(){if(!this._advancedInsertTemplate&&this._useDefaultAdvancedInsert){var l=this.get_element();
var j=b("div.rsAdvancedInsertWrapper div.rsAdvancedEdit",this.get_element());
var k=this.get_advancedFormSettings().modal;
this._advancedInsertTemplate=new c.Scheduling.AdvancedTemplate(l,j,k);
this._advancedInsertTemplate.initialize();
}return this._advancedInsertTemplate;
},_getAdvancedEditTemplate:function(){if(!this._advancedEditTemplate&&this._useDefaultAdvancedEdit){var l=this.get_element();
var j=b("div.rsAdvancedEditWrapper div.rsAdvancedEdit",this.get_element());
var k=this.get_advancedFormSettings().modal;
this._advancedEditTemplate=new c.Scheduling.AdvancedTemplate(l,j,k);
this._advancedEditTemplate.initialize();
}return this._advancedEditTemplate;
},_showAdvancedFormWrapper:function(j){if(j.parent().is(".RadScheduler")){return;
}this.hideInlineForm();
this.hideAdvancedForm();
var k=this.get_element();
b(k).append(j);
if(this._advancedFormSettings.modal){j.css("position","static");
this._makeModal(b("div.rsAdvancedEdit",j)[0]);
}else{b("div.rsTopWrap",k).hide();
}},_makeModal:function(j){if(!this._advancedFormSettings.modal){return;
}this._popupDialog=b.popupDialog(j,b(".rsAdvInnerTitle",j)[0],this._advancedFormSettings);
b(".rsAdvFormWrap",this.get_element()).css({display:"block"});
this._popupDialog.show();
if(this._popupDialog.legacyPositioning()){this.get_element().style.overflow="visible";
}},_getModelFactory:function(j){switch(j){case c.SchedulerViewType.DayView:return new c.Scheduler.DayModelFactory(this);
case c.SchedulerViewType.WeekView:return new c.Scheduler.WeekModelFactory(this);
case c.SchedulerViewType.MonthView:return new c.Scheduler.MonthModelFactory(this);
case c.SchedulerViewType.TimelineView:return new c.Scheduler.TimelineModelFactory(this);
case c.SchedulerViewType.MultiDayView:return new c.Scheduler.MultiDayModelFactory(this);
}},_setIndicatorState:function(l){var k=[],j=[];
b.each(l,function(m){k[m]=(this==1||this==3)?1:0;
j[m]=(this==2||this==3)?1:0;
});
this._aptTopIndicators=k;
this._aptBottomIndicators=j;
this._updateHiddenAppointmentsIndicator(this._aptTopIndicators,"top");
this._updateHiddenAppointmentsIndicator(this._aptBottomIndicators,"bottom");
},_updateHiddenAppointmentsIndicator:function(j,m){var k=m=="top"?"rsTopIndicator":"rsBottomIndicator";
this._removeIndicatorsTable(k);
for(var l=0;
l<j.length;
l++){if(j[l]>0){this._createIndicatorsTable(j,k);
return;
}}},_createIndicatorsTable:function(j,m){var o=b(".rsTopWrap .rsContentScrollArea",this.get_element());
var k=new Telerik.Web.StringBuilder();
k.append("<table cellspacing='0' cellpadding='0' border='0' class='rsArrowContainer ").append(m).append("'><tr>");
for(var n=0;
n<j.length;
n++){k.append("<td>");
if(j[n]>0){k.append("<div class='rsArrowWrap'><a class='rsOvertimeArrow' href='#' /></div>");
}k.append("</td>");
}k.append("</tr></table>");
var l=b(k.toString()).width(o.find(".rsContentTable").width());
o.append(l);
},_removeIndicatorsTable:function(j){b(".rsTopWrap .rsContentScrollArea table."+j,this.get_element()).remove();
},add_appointmentClick:function(j){this.get_events().addHandler("AppointmentClick",j);
},remove_appointmentClick:function(j){this.get_events().removeHandler("AppointmentClick",j);
},raise_appointmentClick:function(j){this.raiseEvent("AppointmentClick",j);
},add_appointmentInserting:function(j){this.get_events().addHandler("AppointmentInserting",j);
},remove_appointmentInserting:function(j){this.get_events().removeHandler("AppointmentInserting",j);
},raise_appointmentInserting:function(j){this.raiseEvent("AppointmentInserting",j);
},add_appointmentDoubleClick:function(j){this.get_events().addHandler("AppointmentDoubleClick",j);
},remove_appointmentDoubleClick:function(j){this.get_events().removeHandler("AppointmentDoubleClick",j);
},raise_appointmentDoubleClick:function(j){this.raiseEvent("AppointmentDoubleClick",j);
},add_appointmentResizeStart:function(j){this.get_events().addHandler("AppointmentResizeStart",j);
},remove_appointmentResizeStart:function(j){this.get_events().removeHandler("AppointmentResizeStart",j);
},raise_appointmentResizeStart:function(j){this.raiseEvent("AppointmentResizeStart",j);
},add_appointmentResizeEnd:function(j){this.get_events().addHandler("AppointmentResizeEnd",j);
},remove_appointmentResizeEnd:function(j){this.get_events().removeHandler("AppointmentResizeEnd",j);
},raise_appointmentResizeEnd:function(j){this.raiseEvent("AppointmentResizeEnd",j);
},add_appointmentResizing:function(j){this.get_events().addHandler("AppointmentResizing",j);
},remove_appointmentResizing:function(j){this.get_events().removeHandler("AppointmentResizing",j);
},raise_appointmentResizing:function(j){this.raiseEvent("AppointmentResizing",j);
},add_appointmentDeleting:function(j){this.get_events().addHandler("AppointmentDeleting",j);
},remove_appointmentDeleting:function(j){this.get_events().removeHandler("AppointmentDeleting",j);
},raise_appointmentDeleting:function(j){this.raiseEvent("AppointmentDeleting",j);
},add_timeSlotClick:function(j){this.get_events().addHandler("TimeSlotClick",j);
},remove_timeSlotClick:function(j){this.get_events().removeHandler("TimeSlotClick",j);
},raise_timeSlotClick:function(j){this.raiseEvent("TimeSlotClick",j);
},add_appointmentEditing:function(j){this.get_events().addHandler("AppointmentEditing",j);
},remove_appointmentEditing:function(j){this.get_events().removeHandler("AppointmentEditing",j);
},raise_appointmentEditing:function(j){this.raiseEvent("AppointmentEditing",j);
},add_appointmentMoveStart:function(j){this.get_events().addHandler("appointmentMoveStart",j);
},remove_appointmentMoveStart:function(j){this.get_events().removeHandler("appointmentMoveStart",j);
},add_appointmentMoving:function(j){this.get_events().addHandler("appointmentMoving",j);
},remove_appointmentMoving:function(j){this.get_events().removeHandler("appointmentMoving",j);
},add_appointmentMoveEnd:function(j){this.get_events().addHandler("appointmentMoveEnd",j);
},remove_appointmentMoveEnd:function(j){this.get_events().removeHandler("appointmentMoveEnd",j);
},add_recurrenceActionDialogShowing:function(j){this.get_events().addHandler("RecurrenceActionDialogShowing",j);
},remove_recurrenceActionDialogShowing:function(j){this.get_events().removeHandler("RecurrenceActionDialogShowing",j);
},raise_recurrenceActionDialogShowing:function(j){this.raiseEvent("RecurrenceActionDialogShowing",j);
},add_recurrenceActionDialogClosed:function(j){this.get_events().addHandler("RecurrenceActionDialogClosed",j);
},remove_recurrenceActionDialogClosed:function(j){this.get_events().removeHandler("RecurrenceActionDialogClosed",j);
},raise_recurrenceActionDialogClosed:function(j){this.raiseEvent("RecurrenceActionDialogClosed",j);
},add_formCreated:function(j){this.get_events().addHandler("FormCreated",j);
},remove_formCreated:function(j){this.get_events().removeHandler("FormCreated",j);
},raise_formCreated:function(j){this.raiseEvent("FormCreated",j);
},add_appointmentContextMenu:function(j){this.get_events().addHandler("AppointmentContextMenu",j);
},remove_appointmentContextMenu:function(j){this.get_events().removeHandler("AppointmentContextMenu",j);
},raise_appointmentContextMenu:function(j){this.raiseEvent("AppointmentContextMenu",j);
},add_timeSlotContextMenu:function(j){this.get_events().addHandler("TimeSlotContextMenu",j);
},remove_timeSlotContextMenu:function(j){this.get_events().removeHandler("TimeSlotContextMenu",j);
},raise_timeSlotContextMenu:function(j){this.raiseEvent("TimeSlotContextMenu",j);
},add_appointmentsPopulating:function(j){this.get_events().addHandler("AppointmentsPopulating",j);
},remove_appointmentsPopulating:function(j){this.get_events().removeHandler("AppointmentsPopulating",j);
},_raiseAppointmentsPopulating:function(j){this.raiseEvent("AppointmentsPopulating",j);
},add_appointmentsPopulated:function(j){this.get_events().addHandler("AppointmentsPopulated",j);
},remove_appointmentsPopulated:function(j){this.get_events().removeHandler("AppointmentsPopulated",j);
},_raiseAppointmentsPopulated:function(){this.raiseEvent("AppointmentsPopulated",Sys.EventArgs.Empty);
},add_appointmentDataBound:function(j){this.get_events().addHandler("AppointmentDataBound",j);
},remove_appointmentDataBound:function(j){this.get_events().removeHandler("AppointmentDataBound",j);
},_raiseAppointmentDataBound:function(j){this.raiseEvent("AppointmentDataBound",j);
},add_appointmentCreated:function(j){this.get_events().addHandler("AppointmentCreated",j);
},remove_appointmentCreated:function(j){this.get_events().removeHandler("AppointmentCreated",j);
},_raiseAppointmentCreated:function(j){this.raiseEvent("AppointmentCreated",new c.AppointmentEventArgs(j));
},add_resourcesPopulating:function(j){this.get_events().addHandler("ResourcesPopulating",j);
},remove_resourcesPopulating:function(j){this.get_events().removeHandler("ResourcesPopulating",j);
},_raiseResourcesPopulating:function(j){this.raiseEvent("ResourcesPopulating",j);
},add_resourcesPopulated:function(j){this.get_events().addHandler("ResourcesPopulated",j);
},remove_resourcesPopulated:function(j){this.get_events().removeHandler("ResourcesPopulated",j);
},_raiseResourcesPopulated:function(){this.raiseEvent("ResourcesPopulated",Sys.EventArgs.Empty);
},add_dataBound:function(j){this.get_events().addHandler("DataBound",j);
},remove_dataBound:function(j){this.get_events().removeHandler("DataBound",j);
},_raiseDataBound:function(){this.raiseEvent("DataBound",Sys.EventArgs.Empty);
},add_requestFailed:function(j){this.get_events().addHandler("RequestFailed",j);
},remove_requestFailed:function(j){this.get_events().removeHandler("RequestFailed",j);
},_raiseRequestFailed:function(j){this.raiseEvent("RequestFailed",j);
},add_requestSuccess:function(j){this.get_events().addHandler("RequestSuccess",j);
},remove_requestSuccess:function(j){this.get_events().removeHandler("RequestSuccess",j);
},_raiseRequestSuccess:function(j){this.raiseEvent("RequestSuccess",j);
},add_appointmentWebServiceInserting:function(j){this.get_events().addHandler("AppointmentWebServiceInserting",j);
},remove_appointmentWebServiceInserting:function(j){this.get_events().removeHandler("AppointmentWebServiceInserting",j);
},_raiseAppointmentWebServiceInserting:function(j){this.raiseEvent("AppointmentWebServiceInserting",j);
},add_appointmentWebServiceDeleting:function(j){this.get_events().addHandler("AppointmentWebServiceDeleting",j);
},remove_appointmentWebServiceDeleting:function(j){this.get_events().removeHandler("AppointmentWebServiceDeleting",j);
},_raiseAppointmentWebServiceDeleting:function(j){this.raiseEvent("AppointmentWebServiceDeleting",j);
},add_appointmentWebServiceUpdating:function(j){this.get_events().addHandler("AppointmentWebServiceUpdating",j);
},remove_appointmentWebServiceUpdating:function(j){this.get_events().removeHandler("AppointmentWebServiceUpdating",j);
},_raiseAppointmentWebServiceUpdating:function(j){this.raiseEvent("AppointmentWebServiceUpdating",j);
},add_recurrenceExceptionCreating:function(j){this.get_events().addHandler("RecurrenceExceptionCreating",j);
},remove_recurrenceExceptionCreating:function(j){this.get_events().removeHandler("RecurrenceExceptionCreating",j);
},_raiseRecurrenceExceptionCreating:function(j){this.raiseEvent("RecurrenceExceptionCreating",j);
},add_recurrenceExceptionsRemoving:function(j){this.get_events().addHandler("RecurrenceExceptionsRemoving",j);
},remove_recurrenceExceptionsRemoving:function(j){this.get_events().removeHandler("RecurrenceExceptionsRemoving",j);
},_raiseRecurrenceExceptionsRemoving:function(j){this.raiseEvent("RecurrenceExceptionsRemoving",j);
},add_navigationCommand:function(j){this.get_events().addHandler("NavigationCommand",j);
},remove_navigationCommand:function(j){this.get_events().removeHandler("NavigationCommand",j);
},add_navigationComplete:function(j){this.get_events().addHandler("NavigationComplete",j);
},remove_navigationComplete:function(j){this.get_events().removeHandler("NavigationComplete",j);
}};
b.registerControlProperties(c.RadScheduler,{shouldPostbackOnAppointmentContextMenuItemClick:false,shouldPostbackOnTimeSlotContextMenuItemClick:false,appointmentContextMenuIDs:[],timeSlotContextMenuIDs:[]});
b.registerControlEvents(c.RadScheduler,["appointmentSerialized","appointmentContextMenuItemClicking","appointmentContextMenuItemClicked","timeSlotContextMenuItemClicking","timeSlotContextMenuItemClicked"]);
c.RadScheduler.registerClass("Telerik.Web.UI.RadScheduler",c.RadWebControl);
})();
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RecurrenceAction=function(){};
Telerik.Web.UI.RecurrenceAction.prototype={Edit:1,Delete:2,Resize:3,Move:4};
Telerik.Web.UI.RecurrenceAction.registerEnum("Telerik.Web.UI.RecurrenceAction");
(function(a){Telerik.Web.UI.RecurrenceActionDialog=function(){};
Telerik.Web.UI.RecurrenceActionDialog.Show=function(c,f){var e=f.Scheduler.get_localization();
var d="";
var g="";
var b="";
switch(c){case Telerik.Web.UI.RecurrenceAction.Delete:d=e.ConfirmRecurrenceDeleteOccurrence;
g=e.ConfirmRecurrenceDeleteSeries;
b=e.ConfirmRecurrenceDeleteTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Edit:d=e.ConfirmRecurrenceEditOccurrence;
g=e.ConfirmRecurrenceEditSeries;
b=e.ConfirmRecurrenceEditTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Resize:d=e.ConfirmRecurrenceResizeOccurrence;
g=e.ConfirmRecurrenceResizeSeries;
b=e.ConfirmRecurrenceResizeTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Move:d=e.ConfirmRecurrenceMoveOccurrence;
g=e.ConfirmRecurrenceMoveSeries;
b=e.ConfirmRecurrenceMoveTitle;
break;
}var h=a.modal("#"+f.Scheduler.get_element().id+">.rsTopWrap");
var i=['<label><input type="radio" id="choiceOccurrenceSpan_0" name="choiceOccurrenceSpan" value="occurrence" checked="checked" />',d,"</label>",'<label><input type="radio" id="choiceOccurrenceSpan_1" name="choiceOccurrenceSpan" value="series" />',g,"</label>"];
h.initialize().set_content({title:b,content:i.join(""),ok:e.ConfirmOK,cancel:e.ConfirmCancel}).set_onActionConfirm(function(l,j){var k=a(j).find("input[name=choiceOccurrenceSpan]:checked").val()=="series";
f.OnConfirm(k,f);
h.dispose();
}).set_onActionCancel(function(){if(f.OnCancel){f.OnCancel(f);
}h.dispose();
}).show();
};
})($telerik.$);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerResource=function(a){this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
if(a){this._key=a.key;
this._type=a.type;
this._text=a.text;
this._internalKey=a.internalKey;
this._available=a.available;
this._cssClass=a.cssClass;
if(typeof(a.attributes)!="undefined"){this._attributes._load(a.attributes);
}}};
Telerik.Web.UI.SchedulerResource.prototype={get_key:function(){return this._key;
},set_key:function(a){this._key=a;
},get_type:function(){return this._type;
},set_type:function(a){this._type=a;
},get_text:function(){return this._text;
},set_text:function(a){this._text=a;
},get_available:function(){return this._available;
},set_available:function(a){this._available=a;
},get_cssClass:function(){return this._cssClass;
},set_cssClass:function(a){this._cssClass=a;
},_getInternalKey:function(){return this._internalKey;
},get_attributes:function(){return this._attributes;
}};
Telerik.Web.UI.SchedulerResource.registerClass("Telerik.Web.UI.SchedulerResource");
Type.registerNamespace("Telerik.Web.UI");
(function(){var a=Telerik.Web.UI;
a.SchedulerResourceCollection=function(){this._array=new Array();
};
a.SchedulerResourceCollection.prototype={add:function(b){var c=this._array.length;
this.insert(c,b);
},insert:function(c,b){Array.insert(this._array,c,b);
},remove:function(b){Array.remove(this._array,b);
},removeAt:function(c){var b=this.getResource(c);
if(b){this.remove(b);
}},indexOf:function(c){for(var b=0,d=this._array.length;
b<d;
b++){if(this._array[b]===c){return b;
}}return -1;
},removeResourcesByType:function(c){var b=this;
this.getResourcesByType(c).forEach(function(d){b.remove(d);
});
},clear:function(){this._array=new Array();
},get_count:function(){return this._array.length;
},forEach:function(c){for(var d=0,b=this.get_count();
d<b;
d++){c(this.getResource(d));
}},getResource:function(b){return this._array[b];
},getResourcesByType:function(b){return this.findAll(function(c){return c.get_type()==b;
});
},getResourceByType:function(c){for(var e=0,b=this.get_count();
e<b;
e++){var d=this.getResource(e);
if(d.get_type()==c){return d;
}}return null;
},findAll:function(c){var b=new a.SchedulerResourceCollection();
this.forEach(function(d){if(c(d)){b.add(d);
}});
return b;
},getResourceByTypeAndKey:function(c,b){return this.findAll(function(d){return d.get_type()==c&&d.get_key()==b;
}).getResource(0)||null;
},clone:function(){var b=new a.SchedulerResourceCollection();
this.forEach(function(c){b.add(c);
});
return b;
}};
a.SchedulerResourceCollection.registerClass("Telerik.Web.UI.SchedulerResourceCollection");
}());
(function(){Type.registerNamespace("Telerik.Web.UI");
var a=Telerik.Web.UI;
a.ResourceType=function(b){if(b){this._name=b.name;
this._allowMultipleValues=b.allowMultipleValues||false;
}};
a.ResourceType.prototype={get_name:function(){return this._name;
},set_name:function(b){this._name=b;
},get_allowMultipleValues:function(){return this._allowMultipleValues;
},set_allowMultipleValues:function(b){this._allowMultipleValues=b;
}};
a.ResourceType.registerClass("Telerik.Web.UI.ResourceType");
})();
(function(){Type.registerNamespace("Telerik.Web.UI");
var a=Telerik.Web.UI;
a.ResourceTypeCollection=function(){this._array=[];
};
a.ResourceTypeCollection.prototype={add:function(b){var c=this._array.length;
this.insert(c,b);
},insert:function(c,b){Array.insert(this._array,c,b);
},remove:function(b){Array.remove(this._array,b);
},removeAt:function(c){var b=this.getResourceType(c);
if(b){this.remove(b);
}},clear:function(){this._array=[];
},get_count:function(){return this._array.length;
},forEach:function(c){for(var d=0,b=this.get_count();
d<b;
d++){c(this.getResourceType(d));
}},getResourceType:function(b){return this._array[b];
},getResourceTypeByName:function(b){return this.findAll(function(c){return c.get_name()==b;
}).getResourceType(0)||null;
},findAll:function(c){var b=new a.ResourceTypeCollection();
this.forEach(function(d){if(c(d)){b.add(d);
}});
return b;
}};
a.ResourceTypeCollection.registerClass("Telerik.Web.UI.ResourceTypeCollection");
}());
Type.registerNamespace("Telerik.Web.UI");
(function(){var a=Telerik.Web.UI;
a.SchedulerAttributeCollection=function(){this._data={};
this._keys=[];
};
a.SchedulerAttributeCollection.prototype={getAttribute:function(b){return this._data[b];
},setAttribute:function(c,b){this._add(c,b);
var d={};
d[c]=b;
},forEach:function(c){for(var e=0,b=this.get_count();
e<b;
e++){var d=this._keys[e];
c(d,this.getAttribute(d));
}},removeAttribute:function(b){Array.remove(this._keys,b);
delete this._data[b];
},get_count:function(){return this._keys.length;
},clear:function(){this._data={};
this._keys=[];
},clone:function(){var b=new a.SchedulerAttributeCollection();
this.forEach(function(d,c){b.setAttribute(d,c);
});
return b;
},_add:function(c,b){if(Array.indexOf(this._keys,c)<0){Array.add(this._keys,c);
}this._data[c]=b;
},_load:function(c){for(var b in c){this._add(b,c[b]);
}}};
a.SchedulerAttributeCollection.registerClass("Telerik.Web.UI.SchedulerAttributeCollection");
}());
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Scheduler.Views");
(function(b,a){b.ModelFactory=function(c){this._owner=c;
};
b.ModelFactory.prototype={createModel:function(){throw Error.notImplemented();
},_getGroupBy:function(){throw Error.notImplemented();
},_getGroupByDate:function(){return/^\s*date\s*/i.test(this._getGroupBy());
},_getGroupingResourceName:function(){var d=this._getGroupBy();
if(d.trim().toLowerCase()=="date"){throw Error.argument("groupBy","groupBy property should be in one of the following formats: <[Resource name]> or <Date,[Resource name]>. Using only <Date> is not allowed. ");
}var c=d.split(",");
if(c.length>2){throw Error.argument("groupBy","GroupBy property should be in one of the following formats: <[Resource name]> or <Date,[Resource name]> ");
}if(this._getGroupByDate()){if(c.length==2){return c[1].trim();
}return"";
}return c[0].trim();
},_getEnableGrouping:function(){return this._getGroupBy()!="";
}};
b.ModelFactory.registerClass("Telerik.Web.UI.Scheduler.ModelFactory");
b.DayModelFactory=function(c){b.DayModelFactory.initializeBase(this,[c]);
};
b.DayModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_dayViewSettings().isVertical||false;
if(this._getGroupByDate()){c=false;
}return new b.ResourceGroupedDayModel(this._owner,this._getGroupingResourceName(),c);
}return new b.DayModel(this._owner);
},_getGroupBy:function(){return this._owner.get_dayViewSettings().groupBy||"";
}};
b.DayModelFactory.registerClass("Telerik.Web.UI.Scheduler.DayModelFactory",b.ModelFactory);
b.WeekModelFactory=function(c){b.WeekModelFactory.initializeBase(this,[c]);
};
b.WeekModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_weekViewSettings().isVertical||false;
if(this._getGroupByDate()){return new b.DateGroupedWeekModel(this._owner,this._getGroupingResourceName(),c);
}else{return new b.ResourceGroupedWeekModel(this._owner,this._getGroupingResourceName(),c);
}}return new b.WeekModel(this._owner);
},_getGroupBy:function(){return this._owner.get_weekViewSettings().groupBy||"";
}};
b.WeekModelFactory.registerClass("Telerik.Web.UI.Scheduler.WeekModelFactory",b.ModelFactory);
b.MultiDayModelFactory=function(c){b.MultiDayModelFactory.initializeBase(this,[c]);
};
b.MultiDayModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_multiDayViewSettings().isVertical||false;
if(this._getGroupByDate()){return new b.DateGroupedMultiDayModel(this._owner,this._getGroupingResourceName(),c);
}else{return new b.ResourceGroupedMultiDayModel(this._owner,this._getGroupingResourceName(),c);
}}return new b.MultiDayModel(this._owner);
},_getGroupBy:function(){return this._owner.get_multiDayViewSettings().groupBy||"";
}};
b.MultiDayModelFactory.registerClass("Telerik.Web.UI.Scheduler.MultiDayModelFactory",b.ModelFactory);
b.MonthModelFactory=function(c){b.MonthModelFactory.initializeBase(this,[c]);
};
b.MonthModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_monthViewSettings().isVertical||false;
if(this._getGroupByDate()){return new a.Month.GroupedByDate.Model(this._owner,this._getGroupingResourceName(),c);
}else{return new a.Month.GroupedByResource.Model(this._owner,this._getGroupingResourceName(),c);
}}return new a.Month.Model(this._owner);
},_getGroupBy:function(){return this._owner.get_monthViewSettings().groupBy||"";
}};
b.MonthModelFactory.registerClass("Telerik.Web.UI.Scheduler.MonthModelFactory",b.ModelFactory);
b.TimelineModelFactory=function(c){b.TimelineModelFactory.initializeBase(this,[c]);
};
b.TimelineModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_timelineViewSettings().isVertical||false;
if(this._getGroupByDate()){return new a.Timeline.GroupedByDate.Model(this._owner,this._getGroupingResourceName(),c);
}else{return new a.Timeline.GroupedByResource.Model(this._owner,this._getGroupingResourceName(),c);
}}return new a.Timeline.Model(this._owner);
},_getGroupBy:function(){return this._owner.get_timelineViewSettings().groupBy||"";
}};
b.TimelineModelFactory.registerClass("Telerik.Web.UI.Scheduler.TimelineModelFactory",b.ModelFactory);
})(Telerik.Web.UI.Scheduler,Telerik.Web.UI.Scheduler.Views);
(function(){var a=Telerik.Web.UI;
var b;
a.SchedulerWebServiceSettings=function(c){a.SchedulerWebServiceSettings.initializeBase(this,[c]);
if(!this._method){this._method="GetAppointments";
}if(c.deleteAppointmentMethod!=b){this._deleteAppointmentMethod=c.deleteAppointmentMethod;
}else{this._deleteAppointmentMethod="DeleteAppointment";
}if(c.insertAppointmentMethod!=b){this._insertAppointmentMethod=c.insertAppointmentMethod;
}else{this._insertAppointmentMethod="InsertAppointment";
}if(c.updateAppointmentMethod!=b){this._updateAppointmentMethod=c.updateAppointmentMethod;
}else{this._updateAppointmentMethod="UpdateAppointment";
}if(c.getResourcesMethod!=b){this._getResourcesMethod=c.getResourcesMethod;
}else{this._getResourcesMethod="GetResources";
}if(c.createRecurrenceExceptionMethod!=b){this._createRecurrenceExceptionMethod=c.createRecurrenceExceptionMethod;
}else{this._createRecurrenceExceptionMethod="CreateRecurrenceException";
}if(c.removeRecurrenceExceptionsMethod!=b){this._removeRecurrenceExceptionsMethod=c.removeRecurrenceExceptionsMethod;
}else{this._removeRecurrenceExceptionsMethod="RemoveRecurrenceExceptions";
}if(c.resourcesPopulated!=b){this._resourcesPopulated=c.resourcesPopulated;
}else{this._resourcesPopulated=true;
}};
a.SchedulerWebServiceSettings.prototype={get_getAppointmentsMethod:function(){return this._method;
},set_getAppointmentsMethod:function(c){this._method=c;
},get_deleteAppointmentMethod:function(){return this._deleteAppointmentMethod;
},set_deleteAppointmentMethod:function(c){this._deleteAppointmentMethod=c;
},get_insertAppointmentMethod:function(){return this._insertAppointmentMethod;
},set_insertAppointmentMethod:function(c){this._insertAppointmentMethod=c;
},get_updateAppointmentMethod:function(){return this._updateAppointmentMethod;
},set_updateAppointmentMethod:function(c){this._updateAppointmentMethod=c;
},get_getResourcesMethod:function(){return this._getResourcesMethod;
},set_getResourcesMethod:function(c){this._getResourcesMethod=c;
},get_createRecurrenceExceptionMethod:function(){return this._createRecurrenceExceptionMethod;
},set_createRecurrenceExceptionMethod:function(c){this._createRecurrenceExceptionMethod=c;
},get_removeRecurrenceExceptionsMethod:function(){return this._removeRecurrenceExceptionsMethod;
},set_removeRecurrenceExceptionsMethod:function(c){this._removeRecurrenceExceptionsMethod=c;
},get_resourcesPopulated:function(){return this._resourcesPopulated;
},set_resourcesPopulated:function(c){this._resourcesPopulated=c;
},get_isEmpty:function(){return a.SchedulerWebServiceSettings.callBaseMethod(this,"get_isEmpty");
}};
a.SchedulerWebServiceSettings.registerClass("Telerik.Web.UI.SchedulerWebServiceSettings",a.WebServiceSettings);
})();
Type.registerNamespace("Telerik.Web.UI");
(function(a){a.ISchedulerModel=function(){};
a.ISchedulerModel.prototype={getTimeSlotFromDomElement:function(b){throw Error.notImplemented();
},getTimeSlotForAppointment:function(b){throw Error.notImplemented();
},updateResizingAppointmentSize:function(b,c){},get_visibleRangeStart:function(){throw Error.notImplemented();
},get_visibleRangeEnd:function(){throw Error.notImplemented();
}};
a.ISchedulerModel.registerInterface("Telerik.Web.UI.ISchedulerModel");
a.ISchedulerTimeSlot=function(){};
a.ISchedulerTimeSlot.prototype={get_index:function(){throw Error.notImplemented();
},get_isAllDay:function(){throw Error.notImplemented();
},get_startTime:function(){throw Error.notImplemented();
},get_endTime:function(){throw Error.notImplemented();
},get_duration:function(){throw Error.notImplemented();
},get_durationInMinutes:function(){throw Error.notImplemented();
},get_domElement:function(){throw Error.notImplemented();
}};
a.ISchedulerTimeSlot.registerInterface("Telerik.Web.UI.ISchedulerTimeSlot");
})(Telerik.Web.UI);
